Monitoring Services With WMI
Learn how to
Monitor Services using WMI
copyrigth : https://knowledge.opsview.com/v5.3/docs/monitoring-services-with-wmi
Windows Management Instrumentation Configuration
To use
Opsview Monitor's 'Agentless' Windows checks, a user account that has access to
Windows Management Instrumentation data counters is required. There are two
methods to accomplish this.
- Create a standard Administrator account.
- Configure a restricted user that is only allowed access to standard user functions and WMI performance counters.
Creating an
Administrator account solely for the purpose of monitoring may lead to security
concerns, hence the outlined instructions on how to create an appropriate
privileged user below.
Configuration
Our guide
will implement three core tasks.
- The account will need access to 'DCOM'. This is the facility used to execute WMI queries.
- The account will need access to the WMI tree. At a minimum, the 'root/CIMv2' branch permission must be granted.
- To allow for performance monitoring, the user needs to be a member of the Performance Monitor Users group.
Our supported configuration is to create a user that is added to the
following Windows Groups:
- Distributed COM Users - this group has default remote access rights to DCOM
- Performance Monitor Users - This group has default read only rights to WMI performance counters
Creating a read-only Monitoring Account
- Create a normal user with 'standard' privileges
- Add this user to the following groups:
2a. Distributed COM Users
2b. Performance Monitor Users
- Open the Windows Management Instrumentation control panel: Start > Run > wmimgmt.msc
- Right click on WMI Control (local) and select Properties
- Navigate to the Security tab
- Select the Root namespace and click Security
- Add the group Performance Monitor Users to this account
- Select the following permissions for Performance
Monitor Users
8a. Execute Methods: Allow
8b. Enable Account: Allow
8c. Remote Enable: Allow
8d. Read Security: Allow
- Once this is completed, select 'Performance Monitor Users' in the list
- Click Advanced within the 'Security for Root' dialog box
- Under Permissions, click on name 'Performance Monitor Users'
- Select Edit
- Ensure This namespace and subnamespaces is selected under the apply to object.
- Click 'OK'
Windows Firewall
If the
Windows Firewall is running on your monitored host, there are some
configuration changes that need to be implemented to allow WMI requests to be
authorized.
- Ensure that the Windows Firewall is started and operating correctly
- Navigate to Control Panel and start the Windows Firewall control panel
- On the left hand side, select Allow a program or feature through Windows Firewall
- Scroll down to the entry, Windows Management Instrumentation (WMI)
- Enable Home/Work (Private) and / or Public access as required
- Click OK
Configure DCOM Permissions
- Open the Component Services Control Panel: Start > Run > dcomcnfg.exe
- Expand Component Services, Computers, My Computer
- Right click on My Computer and select Properties
- Select the tab COM Security
- Under Launch and Access Permissions, select Edit Limits
- Ensure that the group Distributed COM Users has
the following permissions applied:
6a. Local Launch
6b. Remote Launch
6c. Local Activation
6d. Remote Activation
- Once everything is confirmed, select OK then OK again to close the remaining control panel dialog.