Windows Ping Script Graph

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

Post Reply
dirkvdriel
Posts: 3
Joined: Wed Nov 18, 2009 11:02 am

Windows Ping Script Graph

Post by dirkvdriel »

Helo,

I hope that some one can help me with the option Ping Lantency Graph. What I try, the Graph is still empty.
What do I have:
- Windows 2003
- IIS
- Latest version of Cacti (0.8.7e) with the patched installed.

RRDTool say that everything is OK.....
RRDTool Command:

c:/rrdtool/rrdtool.exe graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="cactiserver - Ping Latency" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="milliseconds" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="C\:/Inetpub/wwwroot/cacti/rra/3/17.rrd":ping:AVERAGE \
AREA:a#E8CDEFFF:"" \
GPRINT:a:LAST:"Current\:%8.2lf %s" \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:a:MAX:"Maximum\:%8.2lf %s\n"
RRDTool Says:

OK
Debug log:
11/18/2009 10:27:01 PM - SYSTEM STATS: Time:1.1502 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:0 RRDsProcessed:0
11/18/2009 10:27:00 PM - POLLER: Poller[0] NOTE: There are no items in your poller for this polling cycle!
11/18/2009 10:27:00 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:/php/php.exe, ARGS: -q "c:/inetpub/wwwroot/cacti/cmd.php" 0 3]
11/18/2009 10:27:00 PM - POLLER: Poller[0] NOTE: Poller Int: '60', Scheduled Task Int: '60', Time Since Last: '60', Max Runtime '58', Poller Runs: '1'
11/18/2009 10:26:18 PM - WEBLOG: Poller[0] CACTI2RRD: c:/rrdtool/rrdtool.exe graph - --imgformat=PNG --start=-86400 --end=-300 --title="cactiserver - Ping Latency" --base=1000 --height=120 --width=500 --alt-autoscale-max --lower-limit=0 --vertical-label="milliseconds" --slope-mode --font TITLE:12: --font AXIS:8: --font LEGEND:10: --font UNIT:8: DEF:a="C\:/Inetpub/wwwroot/cacti/rra/3/17.rrd":ping:AVERAGE AREA:a#E8CDEFFF:"" GPRINT:a:LAST:"Current\:%8.2lf %s" GPRINT:a:AVERAGE:"Average\:%8.2lf %s" GPRINT:a:MAX:"Maximum\:%8.2lf %s\n"
11/18/2009 10:26:18 PM - WEBLOG: Poller[0] CACTI2RRD: c:/rrdtool/rrdtool.exe graph - --imgformat=PNG --start=-86400 --end=-300 --title="cactiserver - Ping Latency" --base=1000 --height=120 --width=500 --alt-autoscale-max --lower-limit=0 --vertical-label="milliseconds" --slope-mode --font TITLE:12: --font AXIS:8: --font LEGEND:10: --font UNIT:8: DEF:a="C\:/Inetpub/wwwroot/cacti/rra/3/17.rrd":ping:AVERAGE AREA:a#E8CDEFFF:"" GPRINT:a:LAST:"Current\:%8.2lf %s" GPRINT:a:AVERAGE:"Average\:%8.2lf %s" GPRINT:a:MAX:"Maximum\:%8.2lf %s\n"
11/18/2009 10:26:01 PM - SYSTEM STATS: Time:1.1467 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:0 RRDsProcessed:0
11/18/2009 10:26:00 PM - POLLER: Poller[0] NOTE: There are no items in your poller for this polling cycle!
11/18/2009 10:26:00 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:/php/php.exe, ARGS: -q "c:/inetpub/wwwroot/cacti/cmd.php" 0 3]
11/18/2009 10:26:00 PM - POLLER: Poller[0] NOTE: Poller Int: '60', Scheduled Task Int: '60', Time Since Last: '60', Max Runtime '58', Poller Runs: '1'
11/18/2009 10:25:01 PM - SYSTEM STATS: Time:1.1449 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:0 RRDsProcessed:0
11/18/2009 10:25:00 PM - POLLER: Poller[0] NOTE: There are no items in your poller for this polling cycle!
11/18/2009 10:25:00 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:/php/php.exe, ARGS: -q "c:/inetpub/wwwroot/cacti/cmd.php" 0 3]
11/18/2009 10:25:00 PM - POLLER: Poller[0] NOTE: Poller Int: '60', Scheduled Task Int: '60', Time Since Last: '60', Max Runtime '58', Poller Runs: '1'
11/18/2009 10:24:01 PM - SYSTEM STATS: Time:1.3064 Method:cmd.php Processes:1 Threads:N/A Hosts:2 HostsPerProcess:2 DataSources:1 RRDsProcessed:1
11/18/2009 10:24:01 PM - POLLER: Poller[0] CACTI2RRD: c:/rrdtool/rrdtool.exe update C:\Inetpub\wwwroot\cacti\rra\3\17.rrd --template ping 1258579440:U
11/18/2009 10:24:00 PM - CMDPHP: Poller[0] Time: 0.0919 s, Theads: N/A, Hosts: 1
11/18/2009 10:24:00 PM - CMDPHP: Poller[0] Host[3] DS[17] CMD: perl C:/Inetpub/wwwroot/cacti/scripts/ping.pl 127.0.0.1, output: U
11/18/2009 10:24:00 PM - CMDPHP: Poller[0] Host[3] DS[17] WARNING: Result from CMD not valid. Partial Result: U
11/18/2009 10:24:00 PM - CMDPHP: Poller[0] Host[3] SNMP: Host responded to SNMP
11/18/2009 10:24:00 PM - CMDPHP: Poller[0] Host[3] PING: TCP Ping Success (0.42 ms)
11/18/2009 10:24:00 PM - POLLER: Poller[0] NOTE: There are no items in your poller for this polling cycle!
11/18/2009 10:24:00 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:/php/php.exe, ARGS: -q "c:/inetpub/wwwroot/cacti/cmd.php" 3 3]
11/18/2009 10:24:00 PM - POLLER: Poller[0] DEBUG: About to Spawn a Remote Process [CMD: c:/php/php.exe, ARGS: -q "c:/inetpub/wwwroot/cacti/cmd.php" 0 0]
11/18/2009 10:24:00 PM - POLLER: Poller[0] NOTE: Poller Int: '60', Scheduled Task Int: '60', Time Since Last: '60', Max Runtime '58', Poller Runs: '1'

Other graph works fine I have only a problem with this item, I have look in this form but al the other options gives the same results.

If you need more information, please let me know.....

regards,

Dirk
Attachments
graph.JPG
graph.JPG (51.21 KiB) Viewed 5548 times
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Code: Select all

CMDPHP: Poller[0] Host[3] DS[17] CMD: perl C:/Inetpub/wwwroot/cacti/scripts/ping.pl 127.0.0.1, output: U 
Thats your problem. Fix that so it spits out data and then you'll get some nice graphs.
dirkvdriel
Posts: 3
Joined: Wed Nov 18, 2009 11:02 am

Post by dirkvdriel »

I was also thinking that this is the problem, but I can't see whats wrong.

Regards,

Dirk
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Well for starters, what happens when you manually run that command?
leoh
Posts: 30
Joined: Thu Feb 05, 2009 8:55 am

Post by leoh »

I am facing the same problem here.

WHen I run the command in command line, I get:

Code: Select all

perl /opt/cacti-0.8.7e/scripts/ping.pl 10.235.1.1
973
Logs show:

Code: Select all

SCRIPT: perl /opt/cacti-0.8.7e/scripts/ping.pl 10.235.1.1, output:
U
The graph is most of time empty, but eventually I see a line plotted. And than it stops plotting again.
I have increased ping timeout to 5s in cacti configuration. I did the same in the device configuration.

What is wrong with this ping latency test?
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Linux question on a windows forum...

Anyways, as the device timeout doesn't get passed onto the script, it must have it's own internal timeout (I dont have the code in front of me). My guess is that the device's high latency is causing the script to prematurely time out.

Using spine or cmd.php?
leoh
Posts: 30
Joined: Thu Feb 05, 2009 8:55 am

Post by leoh »

SPINE

The ping is taking no more than 1s to return (1000ms).
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Post by phalek »

leoh wrote:I am facing the same problem here.

WHen I run the command in command line, I get:

Code: Select all

perl /opt/cacti-0.8.7e/scripts/ping.pl 10.235.1.1
973
Logs show:

Code: Select all

SCRIPT: perl /opt/cacti-0.8.7e/scripts/ping.pl 10.235.1.1, output:
U

I like that ...

You probably run that command as root which perfectly returns something. Remember that Cacti normally runs as the cacti user, who does have different rights ( e.g. no ICMP pings ... ).

Try running that script under the cacti user and you will probably get some error message starting with "U" like "Unable to do a ICMP ping" or something like that.
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
leoh
Posts: 30
Joined: Thu Feb 05, 2009 8:55 am

Post by leoh »

Code: Select all

# su - cactiuser
> perl /opt/cacti-0.8.7e/scripts/ping.pl 10.235.1.1
955
I am not sure that permission is the problem. Eventually, (one in 500 tries or so) the script runs and returns a value which is plotted in cacti. Then, for the next 500 rounds (not really this exact number of tries) it fails.

Also, I don't think that it is timeout issue. I have points plotted showing 3000ms. If the script, once in a while, waits 3s for the return, why would it refuses to plot if it gets less than 1s?
Attachments
2010-04-05_1728.png
2010-04-05_1728.png (18.07 KiB) Viewed 4262 times
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests