Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Question about Data Queries

 
Post new topic   Reply to topic    Cacti Forum Index -> Help: Linux/Unix Specific
Author Message
eyechart



Joined: 25 Apr 2002
Posts: 49

PostPosted: Fri Sep 05, 2003 9:22 am    Post subject: Question about Data Queries Reply with quote

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
Back to top
raX
Lead Developer


Joined: 13 Oct 2001
Posts: 2234
Location: Carlisle, PA

PostPosted: Sun Sep 07, 2003 9:12 pm    Post subject: Reply with quote

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
Back to top
eyechart



Joined: 25 Apr 2002
Posts: 49

PostPosted: Mon Sep 08, 2003 7:54 am    Post subject: Reply with quote

I put the two changes in that were suggested, but I am still having the same problem. Is there a way to see the errors that occur during a failed data query?
Back to top
raX
Lead Developer


Joined: 13 Oct 2001
Posts: 2234
Location: Carlisle, PA

PostPosted: Mon Sep 08, 2003 11:34 pm    Post subject: Reply with quote

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:

Code:
php query_host_cpu.php <host> <snmp_community> index


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
Back to top
eyechart



Joined: 25 Apr 2002
Posts: 49

PostPosted: Tue Sep 09, 2003 1:56 am    Post subject: Reply with quote

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:

Code:
php query_host_cpu.php <host> <snmp_community> index


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


OK, the script runs fine this way from the command line. However, when run from the Data Query in cacti, it fails. Any ideas?


-ec
Back to top
raX
Lead Developer


Joined: 13 Oct 2001
Posts: 2234
Location: Carlisle, PA

PostPosted: Wed Sep 10, 2003 6:47 pm    Post subject: Reply with quote

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?


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/2003-09-10/snmp_functions.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
Back to top
eyechart



Joined: 25 Apr 2002
Posts: 49

PostPosted: Thu Sep 11, 2003 12:17 am    Post subject: Reply with quote

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/2003-09-10/snmp_functions.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.


Here is what I get for CPU:

/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
Back to top
eyechart



Joined: 25 Apr 2002
Posts: 49

PostPosted: Thu Sep 11, 2003 2:32 am    Post subject: Reply with quote

Rax,

Your post in another thread seems to have fixed my problem. See http://www.raxnet.net/board/viewtopic.php?p=7918&highlight=#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
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Help: Linux/Unix Specific All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group