Articles > Linux
Printer Friendly Version
Views: 12839

Adding WMI Counters to Cacti on Linux

Last Updated: 9/26/12

Problem: Monitoring Windows servers from Cacti Network Monitoring running on Linux only natively allows for monitoring of SNMP counters and not WMI counters.

Solution: Install SNMPTools [http://labalec.fr/erwan/?page_id=24] SNMP extension on each Windows server, and created custom data and graph templates for Cacti. This extends the features of the native windows SNMP service without replacing it with a third party SNMP service.


Sample counters File:

****** C:\counters.ini  - begin ****************

;you can define here the hardcoded oid for specific ms counters

[1.3.6.1.4.1.15.1]
counter=PhysicalDisk\Avg. Disk Queue Length\_Total

[1.3.6.1.4.1.15.2]
counter=PhysicalDisk\Avg. Disk Queue Length\0 C:

[1.3.6.1.4.1.15.3]
counter=PhysicalDisk\Avg. Disk Queue Length\1 D:



[1.3.6.1.4.1.15.20]
counter=Memory\Pool Paged Bytes

[1.3.6.1.4.1.15.21]
counter=Memory\Pool Nonpaged Bytes

[1.3.6.1.4.1.15.22]
counter=Memory\Free System Page Table Entries

****** C:\counters.ini  - END ****************

Syntax:
[(SNMP OID)]
counter=(WMI Counter name from PerfMon)




Notes:
You will need to put the OID into a new template inside of Cacti and use the same OID inside the counters.ini file.


***** 32-bit reg file for windows server *******
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\ExtensionAgents]
"snmptools"="SOFTWARE\\snmptools\\CurrentVersion"

[HKEY_LOCAL_MACHINE\SOFTWARE\snmptools\currentversion]
"Pathname"="%systemroot%\\snmptools.dll"
"debug"="0"
"counters"="c:\\counters.ini"
"collect_delay"=dword:00000032


******* 64-bit reg file for windows server *************
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\ExtensionAgents]
"snmptools"="SOFTWARE\\snmptools\\CurrentVersion"

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\snmptools\currentversion]
"counters"="c:\\counters.ini"
"debug"="0"
"pathname"="%systemroot%\\snmptools.dll"
"collect_delay"=dword:00000032


Note on Dll files: There is a 32-bit and a 64-bit DLL file. However, the 32-bit DLL is appropriate for 32-bit and 64-bit windows servers 99% of the time. 1% of the time you will need the 64-bit DLL for special counters.



Attached Files:
snmptools_32-64_download.exe (2034 downloads)


Keywords: cacti, linux, wmi, perfmon, counters, templates, tutorial