[SOLVED] Poller isn't polling.

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

asellus
Cacti User
Posts: 50
Joined: Thu Feb 21, 2008 12:09 am

[SOLVED] Poller isn't polling.

Post by asellus »

I've been working this for a bit, and I can't figure out what's going on.

My cacti log is empty. Manually running the poller with the logging level at DEBUG yields nothing (immediately or in the log).

RRA's aren't being created. I manually created one using the "Data Source Debug" -- the code is as follows:
/usr/bin/rrdtool create \
/var/www/cacti/rra/localhost_load_1min_5.rrd \
--step 300 \
DS:load_1min:GAUGE:600:0:500 \
DS:load_5min:GAUGE:600:0:500 \
DS:load_15min:GAUGE:600:0:500 \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
That made a graph finally appear (no data tho), but the others are still missing and the logs are still empty.

Here's basically what I did:

Install Apache, php4, mysql, php4-mysql, snmp, rrdtool.
Set up apache.
Extracted Cacti.
Imported Cacti database.
Created cactiuser
Entered data in crontab
Configured config.php for database password
Chown'd rra/ and log/ for cactiuser:www-data
Installed cacti via web interface.

At this point, Cacti is on an Apache 1.3.34 server with PHP Version 4.4.2-1build1. I'm running Ubuntu 6.06LTS on a Proliant DL380. The server is listening on non-default port, which Cacti seems to recognize just fine.

I don't think anything is wrong with the webserver or sql database, rather it seems as though poller.php is just a blank file. Which it isn't. :|

The poller on Cacti itself is set to cmd.php.

If any other info is needed, please ask. ^^

Thanks in advance!
Last edited by asellus on Wed Mar 19, 2008 7:10 pm, edited 1 time in total.
mickh
Posts: 33
Joined: Tue Mar 11, 2008 12:50 pm

Post by mickh »

Did you tried all the steps in the Debug NaN's in your graphs guide? It helped me a lot in understanding CACTI and fixing my problems...

(M)
asellus
Cacti User
Posts: 50
Joined: Thu Feb 21, 2008 12:09 am

Post by asellus »

Nothing I could do using that page would output -anything-. :(
mickh
Posts: 33
Joined: Tue Mar 11, 2008 12:50 pm

Post by mickh »

Can you do a "rrdtool fetch /lo/ca/tion/of/your/rrd-file.rrd AVERAGE" or "rrdtool info /lo/ca/tion/of/your/rrd-file.rrd"?

What's your version of Apache, PHP, mySQL, net-snmp, rrdtool and on what IX are you running CACTI?

(M)
asellus
Cacti User
Posts: 50
Joined: Thu Feb 21, 2008 12:09 am

Post by asellus »

mickh wrote:Can you do a "rrdtool fetch /lo/ca/tion/of/your/rrd-file.rrd AVERAGE" or "rrdtool info /lo/ca/tion/of/your/rrd-file.rrd"?
Fetch outputs a bunch of:

1205535000: nan nan nan

The number changes.

Info does:
filename = "/var/www/cacti/rra/localhost_load_1min_5.rrd"
rrd_version = "0003"
step = 300
last_update = 1205462369
ds[load_1min].type = "GAUGE"
ds[load_1min].minimal_heartbeat = 600
ds[load_1min].min = 0.0000000000e+00
ds[load_1min].max = 5.0000000000e+02
ds[load_1min].last_ds = "UNKN"
ds[load_1min].value = 0.0000000000e+00
ds[load_1min].unknown_sec = 269
ds[load_5min].type = "GAUGE"
ds[load_5min].minimal_heartbeat = 600
ds[load_5min].min = 0.0000000000e+00
ds[load_5min].max = 5.0000000000e+02
ds[load_5min].last_ds = "UNKN"
ds[load_5min].value = 0.0000000000e+00
ds[load_5min].unknown_sec = 269
ds[load_15min].type = "GAUGE"
ds[load_15min].minimal_heartbeat = 600
ds[load_15min].min = 0.0000000000e+00
ds[load_15min].max = 5.0000000000e+02
ds[load_15min].last_ds = "UNKN"
ds[load_15min].value = 0.0000000000e+00
ds[load_15min].unknown_sec = 269
rra[0].cf = "AVERAGE"
rra[0].rows = 600
rra[0].pdp_per_row = 1
rra[0].xff = 5.0000000000e-01
rra[0].cdp_prep[0].value = NaN
rra[0].cdp_prep[0].unknown_datapoints = 0
rra[0].cdp_prep[1].value = NaN
rra[0].cdp_prep[1].unknown_datapoints = 0
rra[0].cdp_prep[2].value = NaN
rra[0].cdp_prep[2].unknown_datapoints = 0
rra[1].cf = "AVERAGE"
rra[1].rows = 700
rra[1].pdp_per_row = 6
rra[1].xff = 5.0000000000e-01
rra[1].cdp_prep[0].value = NaN
rra[1].cdp_prep[0].unknown_datapoints = 1
rra[1].cdp_prep[1].value = NaN
rra[1].cdp_prep[1].unknown_datapoints = 1
rra[1].cdp_prep[2].value = NaN
rra[1].cdp_prep[2].unknown_datapoints = 1
rra[2].cf = "AVERAGE"
rra[2].rows = 775
rra[2].pdp_per_row = 24
rra[2].xff = 5.0000000000e-01
rra[2].cdp_prep[0].value = NaN
rra[2].cdp_prep[0].unknown_datapoints = 7
rra[2].cdp_prep[1].value = NaN
rra[2].cdp_prep[1].unknown_datapoints = 7
rra[2].cdp_prep[2].value = NaN
rra[2].cdp_prep[2].unknown_datapoints = 7
rra[3].cf = "AVERAGE"
rra[3].rows = 797
rra[3].pdp_per_row = 288
rra[3].xff = 5.0000000000e-01
rra[3].cdp_prep[0].value = NaN
rra[3].cdp_prep[0].unknown_datapoints = 31
rra[3].cdp_prep[1].value = NaN
rra[3].cdp_prep[1].unknown_datapoints = 31
rra[3].cdp_prep[2].value = NaN
rra[3].cdp_prep[2].unknown_datapoints = 31
rra[4].cf = "MAX"
rra[4].rows = 600
rra[4].pdp_per_row = 1
rra[4].xff = 6.0000000000e-01
rra[4].cdp_prep[0].value = NaN
rra[4].cdp_prep[0].unknown_datapoints = 0
rra[4].cdp_prep[1].value = NaN
rra[4].cdp_prep[1].unknown_datapoints = 0
rra[4].cdp_prep[2].value = NaN
rra[4].cdp_prep[2].unknown_datapoints = 0
rra[5].cf = "MAX"
rra[5].rows = 700
rra[5].pdp_per_row = 6
rra[5].xff = 5.0000000000e-01
rra[5].cdp_prep[0].value = NaN
rra[5].cdp_prep[0].unknown_datapoints = 1
rra[5].cdp_prep[1].value = NaN
rra[5].cdp_prep[1].unknown_datapoints = 1
rra[5].cdp_prep[2].value = NaN
rra[5].cdp_prep[2].unknown_datapoints = 1
Do note that the .rrd file used here had to be manually created, as Cacti will not create the files.
mickh wrote:What's your version of Apache, PHP, mySQL, net-snmp, rrdtool and on what IX are you running CACTI?
Apache - 1.3.34
PHP 4.4.2-1build1
MySQL 14.12 Dist 5.0.22 using readline 5.1
net-snmp 5.4.1
rrdtool 1.2.11

I'm not sure what you mean by 'on what IX', but further information may be found in my initial post relating to the system.
mickh
Posts: 33
Joined: Tue Mar 11, 2008 12:50 pm

Post by mickh »

Oops, sorry, my fault, I missed your info in your first post :oops:

Anyway, did you check your poller-error.log? For further details see step 3 of the above mentioned guide. Also did you check the permissions as mentioned in step 6?

(M)
asellus
Cacti User
Posts: 50
Joined: Thu Feb 21, 2008 12:09 am

Post by asellus »

No poller-error.log file exists on the machine -- the only logfile is cacti.log, which remains empty no matter what I do.

The permissions are correct, I did a sudo chown -R cactiuser:cactiuser log rra from within the cacti directory.

This is baffling. The only difference is I'm running it on an apache1 server with php4, rather than apache2 with php5. Reason is the plugin architecture doesn't work on apache2 w/php5. :(
mickh
Posts: 33
Joined: Tue Mar 11, 2008 12:50 pm

Post by mickh »

What is your entry in the crontab? Does the crond executes the poller.php?

(M)
asellus
Cacti User
Posts: 50
Joined: Thu Feb 21, 2008 12:09 am

Post by asellus »

Followed the instructions and put:

*/5 * * * * php /var/www/cacti/poller.php > /dev/null 2>&1


Brings up an interesting question, should I put the full path to php (/usr/bin/php) instead of just php? :|

Either way it won't help since the poller isn't doing anything. No logs, no output, no errors. :(
mickh
Posts: 33
Joined: Tue Mar 11, 2008 12:50 pm

Post by mickh »

How did you created the crontab entry? With "crontab -e -u cactiuser", or did you used an /etc/cron.d/cacti file for it?

Code: Select all

prompt> vi /etc/cron.d/cacti
*/5 * * * *     cactiuser       /usr/bin/php -q /var/www/html/cacti/poller.php > /var/local/log/poller.log 2>&1
Also you should put at least the above mentioned part regarding the poller.og into the entry.

Did you tried running the poller from the CLI/shell?

(M)
asellus
Cacti User
Posts: 50
Joined: Thu Feb 21, 2008 12:09 am

Post by asellus »

I did crontab -e while in cactiuser.

I put the line you posted (modified to use paths that exist for me) in the crontab -e while in cactiuser.

When I test it, I manually run the poller from the shell. No output.

After modifying the line... still no output. The poller itself isn't doing anything, it seems.
asellus
Cacti User
Posts: 50
Joined: Thu Feb 21, 2008 12:09 am

Post by asellus »

Here's what I mean by no output:


$ php poller.php --debug
$ cat /var/www/cacti/log/cacti.log
$


:(
mickh
Posts: 33
Joined: Tue Mar 11, 2008 12:50 pm

Post by mickh »

Ok, what is the content of your "poller-error.log" (see above, should be different from the ...web-path.../log/cacti.log)

And also, what happens if you do follow the instructions from the 3rd step of the above mentioned guide. Especiall the part with the "php -q cmd.php <id> <id>"?

(M)
asellus
Cacti User
Posts: 50
Joined: Thu Feb 21, 2008 12:09 am

Post by asellus »

sudo find / |grep poller-error.log yields no files found, so it's empty. ;)

Following the guide yields no output, no error, nothing.

It's like poller.php contains nothing inside of it. ... but it does. O.o
mickh
Posts: 33
Joined: Tue Mar 11, 2008 12:50 pm

Post by mickh »

Ok, maybe I didn't wrote it clear enough, you defined the location and file name of the poller-error.log in the crontab with this entry:

Code: Select all

prompt> vi /etc/cron.d/cacti 
*/5 * * * * cactiuser /usr/bin/php -q /var/www/html/cacti/poller.php >/var/local/log/poller.log 2>&1
What is content of the cacti.log after you called the cmd.php script?

(M)
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests