I have a clean Cacti install (0.8.6j) running on Windows Server 2003 (std. edition). Cacti is all patched up as is Windows. SNMP polling works against the localhost and I can see my graphs for the data collected that way. What I can't seem to get working is the collection of WMI data via VBScript.
I ran through the instructions on the Simplest Method of Going from Script to Graph with a couple of minor changes (swapping out my vbscript for the walk-through's perl). The script itself, is quite basic. It just retrieves the Processes count from Win32_PerfFormattedData_PerfOS_System:
Code: Select all
On Error Resume Next
Set objWMISvc = GetObject("winmgmts:\\.\root\cimv2")
Set colItems = objWMISvc.ExecQuery("SELECT * from Win32_PerfFormattedData_PerfOS_System")
For Each objItem in colItems
WScript.StdOut.Write objItem.Processes
Next
Code: Select all
02/01/2007 06:50:01 PM - CACTID: Poller[0] Host[1] PING Result: ICMP: Host is Alive
02/01/2007 06:50:01 PM - CACTID: Poller[0] Host[1] SNMP Result: SNMP not performed due to setting or ping result
02/01/2007 06:50:01 PM - CACTID: Poller[0] Host[1] ERROR: Empty result [127.0.0.1]: 'c:/windows/system32/cscript.exe d:/cacti/cacti-0.8.6j/scripts/getprocesscount.vbs'
02/01/2007 06:50:01 PM - CACTID: Poller[0] Host[1] DS[21] WARNING: Result from SCRIPT not valid. Partial Result: ...
02/01/2007 06:50:01 PM - CACTID: Poller[0] Host[1] DS[21] SCRIPT: c:/windows/system32/cscript.exe d:/cacti/cacti-0.8.6j/scripts/getprocesscount.vbs, output: U
02/01/2007 06:50:01 PM - CACTID: Poller[0] Host[1] DS[20] SNMP: v1: 127.0.0.1, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.65539, value: 50715712
02/01/2007 06:50:01 PM - CACTID: Poller[0] Host[1] DS[20] SNMP: v1: 127.0.0.1, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.65539, value: 27879333
02/01/2007 06:50:01 PM - CACTID: Poller[0] Time: 0.8280 s, Threads: 1, Hosts: 2
02/01/2007 06:50:01 PM - SYSTEM STATS: Time:1.1137 Method:cactid Processes:1 Threads:1 Hosts:2 HostsPerProcess:2 DataSources:3 RRDsProcessed:2
Any ideas?