Changed cacti polling interval now graphs stopped

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

Moderators: Developers, Moderators

Post Reply
daisy123
Posts: 9
Joined: Mon May 02, 2016 2:35 pm

Changed cacti polling interval now graphs stopped

Post by daisy123 »

Hi All,

I changed the following:

1. Poller Interval & Cron Interval in Console -> Cacti Settings -> Poller.
2. Clicked Rebuild Poller Cache in Console -> Utilities.
3. All graphs stopped from that time.

I then changed it back to 5 min and Clicked Rebuild Poller Cache but the graphs still do not work.

I then deleted the devices and re-added them, but the graphs still do not work.

I then installed spine, set spine as the poller, but the graphs still do not work.

After playing around with changing poller from cmd.php to spine and running (php /usr/share/cacti/poller.php --force -d), I noticed small little lines/spikes on graphs.. So it is starting to do something but it's not logging correctly like it was.

On checking the logs while using cmd.php I see lots of:

ERROR: /usr/share/cacti/rra/sw0_cov_c28_traffic_in_363.rrd: illegal attempt to update using time 1462214490 when last update time is 1462217535 (minimum one second step)

On checking the logs while using spine I see lots of:

05/02/2016 07:41:53 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /usr/share/cacti/rra/hostname_traffic_in_343.rrd --template traffic_out:traffic_in 1462218113:3006361718:3382184633

So it seems spine is working fine? ha. But only when I run the poller from CLI.

Any ideas on what to check or any advice to get this back on track would be greatly appreciated.
daisy123
Posts: 9
Joined: Mon May 02, 2016 2:35 pm

Re: Changed cacti polling interval now graphs stopped

Post by daisy123 »

To update, It may have been the PHP timezone causing the:

illegal attempt to update using time xxx when last update time is xxx (minimum one second step).

Have corrected PHP timezone to match OS and error has gone. Will update further once some time as passed.
daisy123
Posts: 9
Joined: Mon May 02, 2016 2:35 pm

Re: Changed cacti polling interval now graphs stopped

Post by daisy123 »

No joy. Seems local host is still graphing but nothing else.

If ran from cli it seems to graph for that moment as per screen shot.

Any ideas at all?
Attachments
graph_image.png
graph_image.png (14.24 KiB) Viewed 2732 times
User avatar
micke2k
Cacti User
Posts: 261
Joined: Wed Feb 03, 2016 3:38 pm

Re: Changed cacti polling interval now graphs stopped

Post by micke2k »

Is your cronjob running?
daisy123
Posts: 9
Joined: Mon May 02, 2016 2:35 pm

Re: Changed cacti polling interval now graphs stopped

Post by daisy123 »

EDIT - I have added the cron tab:

*/5 * * * * /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1

And can see it running:

May 3 08:20:01 monitor CROND[9533]: (cacti) CMD ( /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1)
May 3 08:25:01 monitor CROND[13222]: (cacti) CMD ( /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1)
May 3 08:30:01 monitor CROND[16496]: (cacti) CMD ( /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1)
May 3 08:30:01 monitor CROND[16497]: (root) CMD (/usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1)

Have also tried as root, But same no graphing.

Any other ideas at all? As mentioned this was all fine until I changed the poll interval.

Thanks!
Attachments
graph_image.png
graph_image.png (16.2 KiB) Viewed 2717 times
User avatar
micke2k
Cacti User
Posts: 261
Joined: Wed Feb 03, 2016 3:38 pm

Re: Changed cacti polling interval now graphs stopped

Post by micke2k »

Send the output of the cronjob to a logfile and check that logfile.
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Changed cacti polling interval now graphs stopped

Post by phalek »

Did you check the permissions of the rrd files ?
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
daisy123
Posts: 9
Joined: Mon May 02, 2016 2:35 pm

Re: Changed cacti polling interval now graphs stopped

Post by daisy123 »

Thanks,

Have appended the cron into a log, will check that in 5 min.

the rrd's are all 755.

Thanks again for the support! Will never touch the interval again lol
daisy123
Posts: 9
Joined: Mon May 02, 2016 2:35 pm

Re: Changed cacti polling interval now graphs stopped

Post by daisy123 »

Here is the cron > to log file:

http://pastebin.com/3hBEFSVe

also can see my root cron is running along side cacti cron which does not have a crontab (not sure where that is running from):

May 3 10:00:01 monitor CROND[11343]: (root) CMD (/usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1)
May 3 10:00:01 monitor CROND[11344]: (cacti) CMD ( /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1)
May 3 10:05:01 monitor CROND[14632]: (cacti) CMD ( /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1)
May 3 10:05:01 monitor CROND[14633]: (root) CMD (/usr/bin/php /usr/share/cacti/poller.php > /tmp/cacti-root-cron.log)

and the error:

ERROR: /usr/share/cacti/rra/localhost_mem_buffers_3.rrd: illegal attempt to update using time 1462266301 when last update time is 1462266301 (minimum one second step)

Not really sure what this means have had a Google.
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Changed cacti polling interval now graphs stopped

Post by phalek »

You have two cronjob entries, one for root and one for the cacti user.

Do a

Code: Select all

crontab -l
for each user and also check the files within /etc/cron.d/ for any poller.php calls.
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
daisy123
Posts: 9
Joined: Mon May 02, 2016 2:35 pm

Re: Changed cacti polling interval now graphs stopped

Post by daisy123 »

hmm, seems root cron will allow graping, but the cacti cron will not. Will add that cron to a log file and see what it says. Thanks.
Attachments
graph_image (1).png
graph_image (1).png (15.98 KiB) Viewed 2708 times
daisy123
Posts: 9
Joined: Mon May 02, 2016 2:35 pm

Re: Changed cacti polling interval now graphs stopped

Post by daisy123 »

OK so no idea how changing the polling interval broke it, but commenting out the cacti cron and putting it in root cron has solve the issue. I'd like to be more thorough and hopefully help someone else that may face this issue but no other changes were made and has been working fine for years. anyway I know its not the correct fix but it is working now from the root crontab so suspect it is a permission issue somewhere.. Thanks.
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Changed cacti polling interval now graphs stopped

Post by phalek »

Then it's either the owner of the rra directory/rrd files or the permission on the rra directory and/or rrd files.

Most of the time it's either of these two.
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
daisy123
Posts: 9
Joined: Mon May 02, 2016 2:35 pm

Re: Changed cacti polling interval now graphs stopped

Post by daisy123 »

Thanks phalek,

Currently cacti dir is all owed by root. So I guess the cati cron running as cacti user would not be able to run it. perhaps this should never have worked lol.

Will keep playing around see what comes of it :)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest