Script result failing to graph

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

Moderators: Developers, Moderators

liviusbr
Posts: 12
Joined: Tue Sep 20, 2016 4:41 am

Re: Script result failing to graph

Post by liviusbr »

I modified the cron to run every 10 minutes:

/10 * * * * php /usr/share/cacti/site/poller.php > /dev/null 2>&1...

Any other hints?
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Script result failing to graph

Post by phalek »

That would still point to duplicate pollers running. Check the cron directory (Centos /etc/cron.d ) for any cacti related stuff.
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
liviusbr
Posts: 12
Joined: Tue Sep 20, 2016 4:41 am

Re: Script result failing to graph

Post by liviusbr »

phalek wrote:That would still point to duplicate pollers running. Check the cron directory (Centos /etc/cron.d ) for any cacti related stuff.
That's right...

But I did not create that entry...
/etc/cron.d# cat cacti
MAILTO=root
*/5 * * * * www-data php --define suhosin.memory_limit=512M /usr/share/cacti/site/poller.php 2>&1 >/dev/null | if [ -f /usr/bin/ts ] ; then ts ; else tee ; fi >> /var/log/cacti/poller-error.log


Shall I keep the one in /etc/cron.d or the one in /var/spool/cron/crontabs/root ?
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Script result failing to graph

Post by phalek »

I suggest removing the root one as this one probably did come with the install itself
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
liviusbr
Posts: 12
Joined: Tue Sep 20, 2016 4:41 am

Re: Script result failing to graph

Post by liviusbr »

phalek wrote:I suggest removing the root one as this one probably did come with the install itself

Hi phalek,

Thanks, I removed that one.
Do you have any idea how can I automatically compensate the gaps (by graphs) ?
Meaning, cacti will fill in the gaps in between the graphed measurements.
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Script result failing to graph

Post by phalek »

not sure what you are referring to. Cacti takes the "snapshot" data each 5 minute and adds it to the rrd file. As long as data is being delivered every 5 minutes then you won't see any gaps.

If you did have any up until now, that may have been caused by these duplicate poller runs.
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
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: Script result failing to graph

Post by cigamit »

liviusbr wrote: 09/27/2016 03:26:20 PM - CMDPHP: Poller[0] Host[1] DS[15] CMD: /usr/bin/python /usr/share/cacti/site/scripts/AdafruitDHumid.py 2302 4, output: Failed to get reading. Try again!
That is telling you that your script isn't properly getting the measurement (read the notes inside the script). It should probably be rewritten to automatically retry internally until it gets it.
liviusbr wrote:How can I measure the time it takes the poller to run?
It tells you in the log, look for the line that says SYSTEM STATS

I would put the ROOT cron back, and remove that other one. That script you are trying to run requires ROOT access to access the proper pins as we already discovered before.
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Script result failing to graph

Post by phalek »

cigamit is right with the cron. Didn't see that it is running as the www-data user. It needs to be run as root.
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
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests