rrdtool update not running

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

Moderators: Developers, Moderators

ringnutz
Posts: 1
Joined: Tue Oct 07, 2014 10:05 pm

Re: rrdtool update not running

Post by ringnutz »

I hate to revive an old thread, but I am having the same issue as the previous poster. Everything seems to be working as expected, but all graphs show nan
eholz1
Cacti User
Posts: 254
Joined: Mon Oct 01, 2018 10:09 am

Re: rrdtool update not running

Post by eholz1 »

Hello All,
Hope you can reply to this, if no replies, I will repost the question.
I am having exactly (more or less) this problem. But an added challenge: I have two servers polling the same devices.
The server I am checking has (according to /var/log/cron) the poller running - I have just added a poller log file.
I have run the poller manually (cacti-1.1.28, spine, etc) php poller.php --force. This runs, and updates the rrds
in question.

My problem is cron say poller is running, but my rrds are not getting updated on my backup server.
The production server, identical in Red Hat release, cacti-1.1.28, same spine, and same poller settings, cron=5min, poller every 30 sec.
This server runs the cron file and updates the rrds accordingly.

I know you will not like this, but we are running the poller cron as root, and cacti owns the rrds (on both servers)

Any ideas here on what to check? The permissions seem to be the same, etc.

Ouch,
eholz1
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: rrdtool update not running

Post by netniV »

In the cron log, there should be an entry every time the poller runs. When testing by running the PHP command above, ensure you are running it as that user. If it updates, it may well be something to do with what's on the cron file entry.
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
eholz1
Cacti User
Posts: 254
Joined: Mon Oct 01, 2018 10:09 am

Re: rrdtool update not running

Post by eholz1 »

Hello Original Poster,

I had a similar problem. My issue is now solved. I do know that the rrd files and the rra directory (and the log dir) have a high sensitivity
to permissons AND WHO (which user) IS WRITING to them. If you are using 1-1.38 (or .28) you must have some sort of "cacti" user
that has ownership of these directories. to the files can get there in the first place. The user i am using is "cacti".

Are you using spine or cmd.php? So very critical as well is how you run the poller! (understatement). Do not run the poller using root.
Do not have a crontab for root that runs the poller. You have two choices here:
Log on to computer as the cacti user - and set a crontab (if using Linux) for the poller to run.
Here is a typical "user" crontab based setting:
*/5 * * * * /usr/bin/php /var/www/cacti-1.1.28/poller.php > /dev/null 2>&1
Your other choice (i use redhat linux) is to create a file called "cacti" in /etc/cron.d, and code it like this:
*/5 * * * * cacti /usr/bin/php /var/www/cacti-1.1.28/poller.php > /dev/null 2>&1. cacti = your cacti user's name.

you can "cat /var/log/cron | grep "Your Date" to see if the cron job is running. I have cron job running every 5 min, and poller (spine) running every 30 sec.

If you copied any rrd files from a different server, you most likely will have to delete them. You may have to delete any existing rrd files and/or delete graphs. I have been able to leave graphs and delete the rrd files. I can then verify the new rrds are being created in the rra directory
by the "correct" user - NOT root.

Hope this helps.

eholz1
Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests