[mrtg] Re: Ping Latency script from Kevin Nassery reworked(download page)
Jay Hennigan
jay at west.net
Sat Oct 28 02:46:05 MEST 2000
On Fri, 27 Oct 2000, Jelle Beusen wrote:
> Ok fixed :)
>
> Me and my late night rush rush uploads .....
>
> It works now !!!
Actually, I experimented (battling my way through the annoying pop-ups
all the while) and found it with the .ZIP instead of .zip suffix.
Thank you! It's working fine.
I made a few changes, thought you might want to see them.
In the addhost.pl I added the line:
print CONFIG "\#\n";
At the beginning and end of the series of print CONFIG statements.
This helps readability of the .cfg file.
I also commented out the lines for
WithPeak
Options
Unscaled
ShortLegend
Legend1
Legend2
and inclued these in the top of the .cfg directory along with the
document root as globals. Makes each target shorter in the file.
Also changed the PageTop from "600" to the target host.
Here's the modified part:
--- cut here ---
};
open(CONFIG, ">>$config");
print CONFIG "\#\n";
print CONFIG "Target[$targethost.icmp]: \`$collect $targethost\`\n";
print CONFIG "PageTop[$targethost.icmp]: Latency to $targethost\n";
#print CONFIG "WithPeak[$targethost.icmp]: wym\n";
#print CONFIG "Options[$targethost.icmp]: absolute, gauge, growright\n";
print CONFIG "MaxBytes[$targethost.icmp]: 100\n";
print CONFIG "AbsMax[$targethost.icmp]: 300\n";
print CONFIG "Title[$targethost.icmp]: $targethost latency/packetloss stats\n";
#print CONFIG "Unscaled[$targethost.icmp]: dwym\n";
#print CONFIG "Ylegend[$targethost.icmp]: ms\/Percent\n";
# print CONFIG "ShortLegend[$targethost.icmp]: ms\n";
# print CONFIG "Colours[$targethost.icmp]: Golden#cc9900,LightBlue#0000ff,Grey#33
3333,Pink#ff00ff\n";
# print CONFIG "Legend1[$targethost.icmp]: Latency\n";
# print CONFIG "Legend2[$targethost.icmp]: Loss\n";
print CONFIG "\#\n";
close(CONFIG);
--- cut here ---
The top of the .cfg file looks like this:
WorkDir: /docroot/mrtg
WriteExpires: Yes
WithPeak[_]: ymw
Options[_]: absolute, gauge, growright
Unscaled[_]: dwym
Legend1[_]: Latency in ms
Legend2[_]: Packet loss
Legend3[_]: Peak latency
Legend4[_]: Peak loss
LegendI[_]: Round-trip time
LegendO[_]: Packet loss
ShortLegend[_]:
For Solaris, in the pinged.pl script, I had to change @reply to a value
of 5, it was trying to capture the word "avg" from min/avg/max in the
return value. also I changed MaxBytes to 100 to correspond with % loss
and absmax to 300 for the largest latency I cared about. This gives a red
line at the 100 mark for percent if the latency goes over it. I don't
multiply the loss figure by 3.2, so it displays directly in percent.
changed:
@reply = split(/\//, $response[3]);
to:
@reply = split(/\//, $response[5]);
--
Jay Hennigan - Network Administration - jay at west.net
NetLojix Communications, Inc. NASDAQ: NETX - http://www.netlojix.com/
WestNet: Connecting you to the planet. 805 884-6323
--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive http://www.ee.ethz.ch/~slist/mrtg
FAQ http://faq.mrtg.org Homepage http://www.mrtg.org
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
More information about the mrtg
mailing list