Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Sun Mar 24, 2019 7:12 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 19 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: rrdtool update not running
PostPosted: Tue Oct 07, 2014 10:08 pm 
Offline

Joined: Tue Oct 07, 2014 10:05 pm
Posts: 1
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


Top
 Profile  
 
 Post subject: Re: rrdtool update not running
PostPosted: Tue Dec 04, 2018 6:11 pm 
Offline
Cacti User

Joined: Mon Oct 01, 2018 10:09 am
Posts: 103
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


Top
 Profile  
 
 Post subject: Re: rrdtool update not running
PostPosted: Wed Dec 05, 2018 2:46 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2296
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.

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: rrdtool update not running
PostPosted: Mon Dec 10, 2018 2:59 pm 
Offline
Cacti User

Joined: Mon Oct 01, 2018 10:09 am
Posts: 103
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page Previous  1, 2

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group