Question about Data Queries
Moderators: Developers, Moderators
Question about Data Queries
I'm having some problems running the data queries provided in cacti against the polling hosts I have defined. I am running cacti on mandrake, and my polling hosts are all win2k (at this point).
The SNMP Interface Statistics data query runs fine against all polling hosts, so I know that SNMP configuration is good. However, when I run the SNMP Get Processor Information query against a win2k host, I get nothing.
Here are the questions:
1. Does this query work against win32 boxes? Is this just a problem with running cacti on linux and polling win2k boxes?
2. If not, can it be modified to work? It looks like the OIDs are actually there in the win2k environment.
3. How can one debug a data query that failed? I have no idea where to look when this thing fails.
Thanks for the help.
-ec
The SNMP Interface Statistics data query runs fine against all polling hosts, so I know that SNMP configuration is good. However, when I run the SNMP Get Processor Information query against a win2k host, I get nothing.
Here are the questions:
1. Does this query work against win32 boxes? Is this just a problem with running cacti on linux and polling win2k boxes?
2. If not, can it be modified to work? It looks like the OIDs are actually there in the win2k environment.
3. How can one debug a data query that failed? I have no idea where to look when this thing fails.
Thanks for the help.
-ec
The "SNMP - Get Processor Information" data query makes use of the host MIB, but it is typically only useful for Windows machines. If graphing traffic for your Win2k machines works, your SNMP service is probably setup correctly.
I have a feeling that you are running into a 0.8.3 bug. Check out the following post for more details including how to fix it:
http://www.raxnet.net/board/viewtopic.php?p=7710#7710
-Ian
I have a feeling that you are running into a 0.8.3 bug. Check out the following post for more details including how to fix it:
http://www.raxnet.net/board/viewtopic.php?p=7710#7710
-Ian
The get processor information data query is a script query, which are easier to debug. Open up a terminal and cd to Cacti's scripts directory. Now type:
Make sure to fill in the hostname and SNMP community string for the host you want to query. The output should consist of one line for each processor (0,1,2,3,etc). The same general idea should work 'query_host_partitions.php' as well.
-Ian
Code: Select all
php query_host_cpu.php <host> <snmp_community> index
-Ian
OK, the script runs fine this way from the command line. However, when run from the Data Query in cacti, it fails. Any ideas?raX wrote:The get processor information data query is a script query, which are easier to debug. Open up a terminal and cd to Cacti's scripts directory. Now type:
Make sure to fill in the hostname and SNMP community string for the host you want to query. The output should consist of one line for each processor (0,1,2,3,etc). The same general idea should work 'query_host_partitions.php' as well.Code: Select all
php query_host_cpu.php <host> <snmp_community> index
-Ian
-ec
I want to see what Cacti is actually trying to execute when running the script query. Can you download the following file and replace your 'include/snmp_functions.php' with it?eyechart wrote:OK, the script runs fine this way from the command line. However, when run from the Data Query in cacti, it fails. Any ideas?
http://www.raxnet.net/downloads/patches ... ns.php.txt
When you try to add one of these data queries, Cacti will print out the full path to the script query it is trying to execute.
-Ian
Here is what I get for CPU:raX wrote: I want to see what Cacti is actually trying to execute when running the script query. Can you download the following file and replace your 'include/snmp_functions.php' with it?
http://www.raxnet.net/downloads/patches ... ns.php.txt
When you try to add one of these data queries, Cacti will print out the full path to the script query it is trying to execute.
/usr/bin/php -q /var/www/html/cacti/scripts/query_host_cpu.php 10.17.8.8 cacti index
Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/cacti/include/snmp_functions.php:74) in /var/www/html/cacti/host.php on line 92
Here is what I get for mounted partitions:
/usr/bin/php -q /var/www/html/cacti/scripts/query_host_partitions.php 10.17.8.8 cacti index
Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/cacti/include/snmp_functions.php:74) in /var/www/html/cacti/host.php on line 92
-ec
Rax,
Your post in another thread seems to have fixed my problem. See http://www.raxnet.net/board/viewtopic.p ... ight=#7918.
I am not sure if the Get Mounted Partitions query is actually returning data. Atleast now it shows up in the Polling Hosts screen when selected.
Thanks!
-ec
Your post in another thread seems to have fixed my problem. See http://www.raxnet.net/board/viewtopic.p ... ight=#7918.
I am not sure if the Get Mounted Partitions query is actually returning data. Atleast now it shows up in the Polling Hosts screen when selected.
Thanks!
-ec
Who is online
Users browsing this forum: No registered users and 4 guests