Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker on our website.
I've setup cacti and I'm having problems with displaying CPU and disk-stats using the SNMP data query.
The SNMP - Interface Statistics query is working just fine. The queries "SNMP - Get Mounted Partitions" and "SNMP - Get Processor Information" won't work. They both give this message: This data query returned 0 rows, perhaps there was a problem executing this data query.
When I run the query in debug mode, I get this result:
+ Running data query [9].
+ Found type = '6 '[script query].
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/script_server/host_cpu.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/usr/bin/php -q /var/www/localhost/htdocs/cacti/scripts/ss_host_cpu.php data.mycompany.nl 8 2:161:500:public:::MD5::[None] index'
+ Executing script query '/usr/bin/php -q /var/www/localhost/htdocs/cacti/scripts/ss_host_cpu.php data.mycompany.nl 8 2:161:500:public:::MD5::[None] query index'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/script_server/host_cpu.xml'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/script_server/host_cpu.xml'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/script_server/host_cpu.xml'
I've tried this for multiple hosts, all have the same problem. I'm using Cacti version 0.8.6g . Any idea's on this issue?
what is the operating system on the polled device ?
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
I saw this announcement: http://forums.cacti.net/viewtopic.php?t=9352, done that and I've got the diskstats running now. My cpu-query is still returning 0 rows. Do I need something special in my snmpd.conf ?
com2sec local 127.0.0.1/32 public
com2sec local 192.168.0.0/24 public
group MyROGroup v1 local
group MyROGroup v2c local
group MyROGroup usm local
view all included .1 80
access MyROGroup "" any noauth exact all none none
syslocation somewhere
syscontact someone<1@2.3>
+ Running data query [9].
+ Found type = '6 '[script query].
+ Found data query XML file at '/usr/share/cacti/resource/script_server/host_cpu.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/usr/bin/php -q /usr/share/cacti/scripts/ss_host_cpu.php 192.168.1.5 public 1 index'
+ Executing script query '/usr/bin/php -q /usr/share/cacti/scripts/ss_host_cpu.php 192.168.1.5 public 1 query index'
+ Found data query XML file at '/usr/share/cacti/resource/script_server/host_cpu.xml'
+ Found data query XML file at '/usr/share/cacti/resource/script_server/host_cpu.xml'
+ Found data query XML file at '/usr/share/cacti/resource/script_server/host_cpu.xml'
But, when I run the suggested snmpwalk on the cacti server :
Please goto Settings and select DEBUG as Logging Level. Run this for at least one polling cycle. Please have a look at <path_cacti>/log/cacti.log and search for the numeric OID. Please post your findings
Reinhard
I've done that now, but the numeric OID doesn't apear in my logfiles. I have the dataquery "SNMP - Get Processor Information" enabled for the host, data query debug information shows :
+ Running data query [9].
+ Found type = '6 '[script query].
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/script_server/host_cpu.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/usr/bin/php -q /var/www/localhost/htdocs/cacti/scripts/ss_host_cpu.php 192.168.1.1 8 2:161:500:public:::MD5::[None] index'
+ Executing script query '/usr/bin/php -q /var/www/localhost/htdocs/cacti/scripts/ss_host_cpu.php 192.168.1.1 8 2:161:500:public:::MD5::[None] query index'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/script_server/host_cpu.xml'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/script_server/host_cpu.xml'
+ Found data query XML file at '/var/www/localhost/htdocs/cacti/resource/script_server/host_cpu.xml'
Krietjur wrote:I've done that now, but the numeric OID doesn't apear in my logfiles. I have the dataquery "SNMP - Get Processor Information" enabled for the host
Sorry for that. But this is a script query, that is, the SNMP calls are executed from within the script. So you won't see these OIDs in the log file. There's another approach which is based on the ucd/net - CPU Usage SNMP query.
Reinhard