No Graph for a own script

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

Moderators: Developers, Moderators

Post Reply
coolmike
Posts: 9
Joined: Mon Nov 14, 2005 3:24 am

No Graph for a own script

Post by coolmike »

Hi
I want to check, if my webserver is showing one speziall keyword when I call the side. Afterwards I want to use Thold to alarm me, when Apache is down.

I wrote a PHP Script, which is giving a 1 or a 0. I created a Data Input Method, Data Source template, and graph template and everything looks ok. The RRD file is created and I also don't see any errors in the log. But graph is not displayed. I see only the titel.

What could be wrong?

Thanks
Michael
coolmike
Posts: 9
Joined: Mon Nov 14, 2005 3:24 am

Post by coolmike »

In the log file I see the following:
Data Source: bern - WebCheck
RRD: /usr/share/cacti/site/rra/bern_webcheck_69.rrd
Action: 1, Script: /usr/bin/php -q /usr/share/cacti/site/scripts/webcheck.php http://bern.tophost.ch Bern
Is the number "1" after the word action the result from the script? If yes, then I would be also sure, that the script is working.

Michael
coolmike
Posts: 9
Joined: Mon Nov 14, 2005 3:24 am

Post by coolmike »

Here are a bit more information
Data Source Debug

/usr/bin/rrdtool create \
/usr/share/cacti/site/rra/bern_webcheck_69.rrd \
--step 300 \
DS:webcheck:ABSOLUTE:600:0:1 \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

coolmike wrote:In the log file I see the following:
Data Source: bern - WebCheck
RRD: /usr/share/cacti/site/rra/bern_webcheck_69.rrd
Action: 1, Script: /usr/bin/php -q /usr/share/cacti/site/scripts/webcheck.php http://bern.tophost.ch Bern
Is the number "1" after the word action the result from the script? If yes, then I would be also sure, that the script is working.

Michael
No. The Action gives the type of the query to be used. You'll want to switch to DEBUG mode and have a look at cacti.log to see what's going on
Reinhard
coolmike
Posts: 9
Joined: Mon Nov 14, 2005 3:24 am

Post by coolmike »

Hi

Thanks for your answer, I activated now the debug mode and just found the following in the log:

[quate]
11/20/2005 03:40:06 PM - CMDPHP: Poller[0] Host[4] DS[70] CMD: /usr/bin/php -q /usr/share/cacti/site/scripts/webcheck.php http://zug.tophost.ch Zug, output: 1
[/quote]

The output is correct, but still the graph is not created...

Michael
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Seems to be ok. Now check that output for any occurences of the specific rrd file that you postet before (look for rrdtool creat/update) and post please. You may append a screenshot from your failing graph
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests