PHP-script-server-script result goes to wrong graph

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
tcdev
Posts: 1
Joined: Fri Jul 08, 2016 8:16 am

PHP-script-server-script result goes to wrong graph

Post by tcdev »

Hello,

I have a very strange behavior of a PHP script-server-script (Cacti-Version 0.8.8b ).

Description of script:
This script reads the online-count of modems of CMTS of a specific upstream-interface (i.e. Cable8/0/5-upstream1
and the total-count of modems of CMTS of a specific upstream-interface from a tmp-file.
(The tmp-file is be created by an external job.)
Every upstream-interface has its own graph to display online/total-count of modem.

Description of problem:
This is a log of a correct poller run:
1) 07/08/2016 04:00:04 PM - CMDPHP: Poller[0] Host[16] DS[2735] SERVER: /usr/share/cacti/site/scripts/ss_cmts.php ss_cmts cmts10.lab.net get cmonline Cable8/0/1-upstream1, output: 0
2) 07/08/2016 04:00:04 PM - CMDPHP: Poller[0] Host[16] DS[2735] SERVER: /usr/share/cacti/site/scripts/ss_cmts.php ss_cmts cmts10.lab.net get cmtotal Cable8/0/1-upstream1, output: 0
3) 07/08/2016 04:00:04 PM - CMDPHP: Poller[0] Host[16] DS[2736] SERVER: /usr/share/cacti/site/scripts/ss_cmts.php ss_cmts cmts10.lab.net get cmonline Cable8/0/5-upstream0, output: 14
4) 07/08/2016 04:00:04 PM - CMDPHP: Poller[0] Host[16] DS[2736] SERVER: /usr/share/cacti/site/scripts/ss_cmts.php ss_cmts cmts10.lab.net get cmtotal Cable8/0/5-upstream0, output: 15

And sometimes ( we guess, if the network-load is very high and the host (CMTS) response is very slow)
we find this in the log:
1) 07/08/2016 04:02:04 PM - CMDPHP: Poller[0] Host[16] DS[2735] SERVER: /usr/share/cacti/site/scripts/ss_cmts.php ss_cmts cmts10.lab.net get cmonline Cable8/0/1-upstream1, output: 0
2) 07/08/2016 04:02:04 PM - CMDPHP: Poller[0] Host[16] DS[2735] SERVER: /usr/share/cacti/site/scripts/ss_cmts.php ss_cmts cmts10.lab.net get cmtotal Cable8/0/1-upstream1, output: 14
3) 07/08/2016 04:02:04 PM - CMDPHP: Poller[0] Host[16] DS[2736] SERVER: /usr/share/cacti/site/scripts/ss_cmts.php ss_cmts cmts10.lab.net get cmonline Cable8/0/5-upstream0, output: 15
4) 07/08/2016 04:02:04 PM - CMDPHP: Poller[0] Host[16] DS[2736] SERVER: /usr/share/cacti/site/scripts/ss_cmts.php ss_cmts cmts10.lab.net get cmtotal Cable8/0/5-upstream0, output: 0

The script output of row 3 went to row 2.
The script output of row 4 went to row 3.
And now we have wrong graphs i.e. in graph for upstream Cable8/0/1-upstream1 is now a cmtotal > 0, but there are no modems on this upstream.
wrong_cmtotal.png
wrong_cmtotal.png (3.73 KiB) Viewed 845 times
The tmp-file was not changed.
If we run this script not in script-server just as "/usr/bin/php -q /usr/share/cacti/site/scripts/query_cmts.php get ...", we get always correct graphs with or without high network-load.

In the next poller run it could happen, that poller outputs and graphs are synchronously again -> correct graphs.
But sometimes poller outputs and graphs are not synchronously nevermore, and I have to reindex manualy the host.

Would be nice if anybody could help:
Do anybody knows this phenomen?
What's the reason?
How could I avoid that?
Do I anything wrong?
Is it a problem of this PHP-script or PHP-script-server or automatic reindexing?
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests