strange poller behaviour
Moderators: Developers, Moderators
strange poller behaviour
Hello everybody!
I'm having a bit of a problem when switching from cmd.php to cactid as poller.
It seems that some values are being graphed only at random intervals (Attached is a screenshot). This problem will only occur when a php script is called to check the target host.
This problem does not occur when using cmd.php
I'm quite new to cacti, so maybe I'm doing something completely foolish - though all works fine as long as I use cmd.php as poller...
Any help would be greatly appreciated.
Thanks and take care,
Bjoern
My setup is:
[root@cacti scripts]# uname -a
Linux cacti 2.6.11-1.1369_FC4 #1 Thu Jun 2 22:55:56 EDT 2005 i686 i686 i386 GNU/Linux
[root@cacti scripts]# cactid -v
CACTID 0.8.6i Copyright 2002-2006 by The Cacti Group
[root@cacti scripts]# tail -10 ../log/cacti.log
11/13/2006 03:50:05 PM - CACTID: Poller[0] Host[10] DS[95] WARNING: Result from SNMP not valid. Partial Result: ...
11/13/2006 03:50:05 PM - CACTID: Poller[0] Host[10] DS[96] WARNING: Result from SNMP not valid. Partial Result: ...
11/13/2006 03:50:08 PM - SYSTEM STATS: Time:5.4267 Method:cactid Processes:1 Threads:3 Hosts:17 HostsPerProcess:17 DataSources:161 RRDsProcessed:130
(script call to check the host)
[root@cacti scripts]#php -q ../scripts/apache_serverstatus.php webserver1
total_accesses:9428785 totalKb:142739684 busyworkers:148 idleworkers:52 status__:52 status_s:0 status_r:2 status_w:16 status_k:130 status_d:0 status_l:0 status_g:0 status_openslot:1848
I'm having a bit of a problem when switching from cmd.php to cactid as poller.
It seems that some values are being graphed only at random intervals (Attached is a screenshot). This problem will only occur when a php script is called to check the target host.
This problem does not occur when using cmd.php
I'm quite new to cacti, so maybe I'm doing something completely foolish - though all works fine as long as I use cmd.php as poller...
Any help would be greatly appreciated.
Thanks and take care,
Bjoern
My setup is:
[root@cacti scripts]# uname -a
Linux cacti 2.6.11-1.1369_FC4 #1 Thu Jun 2 22:55:56 EDT 2005 i686 i686 i386 GNU/Linux
[root@cacti scripts]# cactid -v
CACTID 0.8.6i Copyright 2002-2006 by The Cacti Group
[root@cacti scripts]# tail -10 ../log/cacti.log
11/13/2006 03:50:05 PM - CACTID: Poller[0] Host[10] DS[95] WARNING: Result from SNMP not valid. Partial Result: ...
11/13/2006 03:50:05 PM - CACTID: Poller[0] Host[10] DS[96] WARNING: Result from SNMP not valid. Partial Result: ...
11/13/2006 03:50:08 PM - SYSTEM STATS: Time:5.4267 Method:cactid Processes:1 Threads:3 Hosts:17 HostsPerProcess:17 DataSources:161 RRDsProcessed:130
(script call to check the host)
[root@cacti scripts]#php -q ../scripts/apache_serverstatus.php webserver1
total_accesses:9428785 totalKb:142739684 busyworkers:148 idleworkers:52 status__:52 status_s:0 status_r:2 status_w:16 status_k:130 status_d:0 status_l:0 status_g:0 status_openslot:1848
- Attachments
-
- Busyworkers & Idleworkers only get graphed now and then...
- graph_image.php.png (24.53 KiB) Viewed 1598 times
Hi Reinhard!
First of all thanks for your reply and greetings from Muenster as well
I followed your NaN guide and found some strange things (please bear with me since I'm really new to cacti...)
As to 1:
Running the php script directly from shell as cacti user always returns correct values (see php -q ../scripts/apache_serverstatus.php webserver1 in my fist post)
As to 2:
Still in the logfile sometimes the corresponding line reads like this:
and sometimes like this:
Is the rest of the script output just truncated in the logfile or is there really something amiss?
I tried calling the php script directly from shell a couple of times, it always returned the complete result.
As to 3:
MySQL updateing seems ok
As to 4:
This is something that puzzles me. I do not find any line containing rrdtool ***
This seems to be faulty if I got your howto right. Still I cant find these lines in another test cacti installation logfile as well (this one is using cmd.php as poller). The graphs of this test installation are perfectly ok (both installation poll the same hosts)
Am I supposed to find the logentry on each poller cycle?
As to 5:
Trying to get the avarage from the corresponding rra file does give me loads of NaNs (ah, well now i know where I was supposed to find them
As to 6:
rrdtool info gives me the following min and max values:
This should give me a valid value range from 0 - 2048 for both idle and busy workers. The output of the php script for these values is well withing that range.
So it seems to me I've got 2 major problems:
1) if logentries do not get truncated, I sometimes get not all information back from the php script.
2) something is wrong with rrdtool (like not updating etc.)
Am I right or am I missing some more here?
Thanks anyway for the great howto!
Greetings and all the best
Bjoern
First of all thanks for your reply and greetings from Muenster as well
I followed your NaN guide and found some strange things (please bear with me since I'm really new to cacti...)
As to 1:
Running the php script directly from shell as cacti user always returns correct values (see php -q ../scripts/apache_serverstatus.php webserver1 in my fist post)
As to 2:
Still in the logfile sometimes the corresponding line reads like this:
Code: Select all
11/14/2006 08:07:09 AM - CACTID: Poller[0] Host[4] DS[63] SCRIPT: /usr/bin/php -q /data/cacti.dbap.de/cacti_2/scripts/apache_serverstatus.php webserver1, output: total_accesses:7709363 totalKb:34896420 busyworkers:84 idleworkers:172 status__:172 status_s:0 status_r:0 status_w:4 status_k:80 status_d:0 status_l:0 status_g:0 status_openslot:0
Code: Select all
11/14/2006 08:07:09 AM - CACTID: Poller[0] Host[6] DS[64] SCRIPT: /usr/bin/php -q /data/cacti.dbap.de/cacti_2/scripts/apache_serverstatus.php webserver1.dbap.de, output: total_accesses:10186645
I tried calling the php script directly from shell a couple of times, it always returned the complete result.
As to 3:
MySQL updateing seems ok
As to 4:
This is something that puzzles me. I do not find any line containing rrdtool ***
This seems to be faulty if I got your howto right. Still I cant find these lines in another test cacti installation logfile as well (this one is using cmd.php as poller). The graphs of this test installation are perfectly ok (both installation poll the same hosts)
Am I supposed to find the logentry
Code: Select all
rrdtool update <filename> --template ...
As to 5:
Trying to get the avarage from the corresponding rra file does give me loads of NaNs (ah, well now i know where I was supposed to find them
As to 6:
rrdtool info gives me the following min and max values:
Code: Select all
ds[idleworkers].min = 0.0000000000e+00
ds[idleworkers].max = 2.0480000000e+03
ds[busyworkers].min = 0.0000000000e+00
ds[busyworkers].max = 2.0480000000e+03
So it seems to me I've got 2 major problems:
1) if logentries do not get truncated, I sometimes get not all information back from the php script.
2) something is wrong with rrdtool (like not updating etc.)
Am I right or am I missing some more here?
Thanks anyway for the great howto!
Greetings and all the best
Bjoern
It seems I did find the error...
Just for those who might end up here, having the same prob...
As mentioned above, I did not get the complete output of the called php scripts in the logfile.
As sometimes I DID get all output, I concluded that no truncating was done on the output.
So it seemd quite probable that the php script had a problem.
Checking the php script showed that the individual vars were printed out directly (during a loop) and not as a concatenated string at the end of the script.
This works fine with cmd.php as poller but poses a problem with cactid.
Maybe this can be handled by output buffering of php, have'nt look into that right now...
Anyway thanks for your help and take care
Bjoern
Just for those who might end up here, having the same prob...
As mentioned above, I did not get the complete output of the called php scripts in the logfile.
As sometimes I DID get all output, I concluded that no truncating was done on the output.
So it seemd quite probable that the php script had a problem.
Checking the php script showed that the individual vars were printed out directly (during a loop) and not as a concatenated string at the end of the script.
This works fine with cmd.php as poller but poses a problem with cactid.
Maybe this can be handled by output buffering of php, have'nt look into that right now...
Anyway thanks for your help and take care
Bjoern
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
This is a known behaviour. Somewhere in the docs I've mentioned this. If you find a place where this needs to be added, please let me knowbeorn wrote:Checking the php script showed that the individual vars were printed out directly (during a loop) and not as a concatenated string at the end of the script.
This works fine with cmd.php as poller but poses a problem with cactid.
Reinhard
Who is online
Users browsing this forum: No registered users and 1 guest