Ping Host Data Input

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

Moderators: Developers, Moderators

Post Reply
lmhunt
Posts: 2
Joined: Fri Nov 08, 2002 1:30 pm

Ping Host Data Input

Post by lmhunt »

I am using the ping host data input and am having some problems. The graphs are showing 1.0 and 2.0 ms however when I view the data source and select the 'edit data' function, I see a value such as 154ms. It appears that the data is being collected properly but the displayed graphs are not accurate. I must be missing a graph or data input setting somewhere. If possible, please provide information as to how this can be corrected. Thanks in advance.
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

I am not sure if this will fix your problem, but try using this code in place of 'ping.pl'.

Code: Select all

#!/usr/bin/perl

$ping = `ping -c 1 $ARGV[0] -w 1 | grep icmp_seq`;
$ping =~ s/(.*time=)(.*) (ms|usec)//;

print (("$3" eq "ms") ? $2 : $2/1000);
Tell me how it works. If this does not fix the problem, it may be a matter of tweaking 'Unit Exponent Value' in the graph setup.

-Ian
Guest

re: ping hosts and scripts

Post by Guest »

Thanks for the reply. Unfortunately I am still seeing strange values. It appears to be a graphing problem. I say this because when I use the console to go to data sources and select one of the ping data sources and then select 'edit data' I see the last value collected (also have viewed the rrd.log file). The values are what I would expect them to be (over 100ms for WAN sites). However, the graphs sometimes will show accurate values and then change back to 1 or 2. What do you suggest I change the exponent value to? Thanks for your help.

Lindsay Hunt
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

The exponent value should be fine left at 0, at least for typical ping graphs. You can try changing it to 1 though since that is another common value for this field. Also while I'm mentioning fields, make sure your base value is set to '1000' (it should be by default).

-Ian
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests