Ping script, no graphs!

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

Moderators: Developers, Moderators

Post Reply
bralaap
Posts: 1
Joined: Sun Nov 30, 2003 6:06 pm

Ping script, no graphs!

Post by bralaap »

Hi,

I made a php script that pings my local computers to see if they are online, the script outputs someting like this:

pc1:1 pc2:0 pc3:1 pc4:0

(where 1 = online, 0 offline)

The problem is that i`m not getting any graphs out of this information.

Rrdtool gets this command:

/usr/local/rrdtool-1.0.45/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--title="Thuis161 Status" \
--base=1000 \
--height=200 \
--width=600 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="Online" \
DEF:a="/var/www/html/cacti-0.8.4/rra/thuis161status.rrd":pc1:AVERAGE \
DEF:b="/var/www/html/cacti-0.8.4/rra/thuis161status.rrd":pc2:AVERAGE \
DEF:c="/var/www/html/cacti-0.8.4/rra/thuis161status.rrd":pc3:AVERAGE \
DEF:d="/var/www/html/cacti-0.8.4/rra/thuis161status.rrd":pc4:AVERAGE \
STACK:a#FFF200:"pc1.lan\n" \
STACK:b#FF6044:"pc2.lan\n" \
STACK:c#D2D8F9:"pc3.lan\n" \
STACK:d#008A77:"pc4.lan"

Is there any way to check if the .rrd file has data in it, so i can test if the problem is in the rrd file or somewhere else!

Thanks in advance!

cheers, harris
User avatar
bulek
Cacti Pro User
Posts: 854
Joined: Mon May 20, 2002 2:07 am
Location: Poland
Contact:

Post by bulek »

You can check if the data is inside by using "rrdtool dump" command. Regarding your graph... you can't have all STACK data series. The first one has to be defined as AREA.

- Piotr
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests