What script is creating this graph?

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

Moderators: Developers, Moderators

Post Reply
miker
Posts: 1
Joined: Fri Mar 26, 2004 9:20 am

What script is creating this graph?

Post by miker »

Can someone please tell me where the script is to creat this graph? I've seen it on several peoples Cacti pages, but it doesn't appear to have been included in my Cacti distribution. I thought at first it was a custom script someone made, but I've seen it on more than one site. Where can I get instructions on doing this?

Image
Guest

Post by Guest »

I am also interested about that script.
User avatar
SCaRaBaeuS
Posts: 22
Joined: Tue Mar 30, 2004 9:42 am

Post by SCaRaBaeuS »

i think that is the ping host, lemme see :P
http://www.only4clans.com/stats/graph.p ... graph_id=6

yupz allmost the same only abit changed :)
User avatar
egarnel
Cacti Pro User
Posts: 708
Joined: Thu Nov 21, 2002 8:55 am
Location: Austin, TX

latency script

Post by egarnel »

I believe I got this from the cacti board. It works fine for me.

I use it to check latency across my own network and from my network to a popular site.

Code: Select all

#!/usr/bin/perl

$count = $ARGV[0];
$host = $ARGV[1];
open (PING, "ping -nqc$count $host|");
while (<PING>) {
/(\d+)% packet loss/ && ($loss = $1);
/= (.+)\/(.+)\/(.+)\/(.+) ms/ && (($min,$avg,$max,$dev) = ($1,$2,$3,$4));
};
close (PING);
print "min:$min avg:$avg max:$max dev:$dev loss:$loss";
~
idle
Cacti User
Posts: 77
Joined: Wed May 26, 2004 10:49 am
Location: Barcelona
Contact:

Post by idle »

How do I add it?
beavis
Posts: 23
Joined: Tue May 11, 2004 6:55 pm

Post by beavis »

Ok, I have this running on my system. Been running so far, so good. I would like to change the variables though. Current, they are setup in 10 percent increments. On our network (WISP) 1-2% is enough to cause customers to call in and anything over 11% is pretty much unusable. What is the best way to edit this so that I have these values:

0%
1-2 %
3-5%
6-10%
11-100%


I'm not sure what to edit for this to happen - data values, data queries, graph/data templates.. What specifically needs to be changed ?
beavis
Posts: 23
Joined: Tue May 11, 2004 6:55 pm

Post by beavis »

Oh I think I just answered my own question...

Editing the corresponding CDEFs first, then editing the graph template to reflect those changes. Easy.
Guest

More Information

Post by Guest »

I am a new Cacti user, and *really* want to get the above graph setup. I have the script going, data template & graph template but things aren't working as they should.

Can someone provide a little more detail or template that I can import?

Thanks,

A.
carbon60
Posts: 8
Joined: Fri Sep 17, 2004 8:41 am
Location: Ottawa, CA
Contact:

Logged in now

Post by carbon60 »

Guess I should have logged in. The above post is mine.

Thanks,

A.
Technologist
User avatar
twistedmonkey
Posts: 2
Joined: Fri Sep 17, 2004 4:19 pm
Location: Portugal

Post by twistedmonkey »

Can anyone please post more info about how to put this graphic template working ?

:-)
There's no place like ::1
User avatar
twistedmonkey
Posts: 2
Joined: Fri Sep 17, 2004 4:19 pm
Location: Portugal

Post by twistedmonkey »

twistedmonkey wrote:Can anyone please post more info about how to put this graphic template working ?

:-)
It would be great if someone having the graphic working (like the one in the top) to post an export template :-)
There's no place like ::1
carbon60
Posts: 8
Joined: Fri Sep 17, 2004 8:41 am
Location: Ottawa, CA
Contact:

More Information

Post by carbon60 »

I have a script that outputs the average, minimum, maximum and deviation of the latency, in addition to the packet loss.

I have a simple graph that uses the maximum and loss values, but it doesn't quite represent the data. How do I divide the loss up into sections like the above graph? What to the settins for AVERAGE, MAXIMUM, etc mean?

Thanks,

A.
Technologist
User avatar
chkaotic
Posts: 11
Joined: Wed Oct 06, 2004 3:17 pm
Location: Wichita, KS

Post by chkaotic »

Here is the same script I modified for use on Windows-based servers. I also adjusted the output to include everything, including sent/received/lost totals.

hope this helps anyone.
#!/usr/bin/perl

$count = $ARGV[0];
$host = $ARGV[1];
open (PING, "ping -n $count $host|");

while (<PING>)
{
/(\d+)% loss/ && ($pct = $1);
/Sent = (\d+), Received = (\d+), Lost = (\d+)/ && (($snt,$rcv,$lst) = ($1,$2,$3));
/Minimum = (\d+)ms, Maximum = (\d+)ms, Average = (\d+)ms/ && (($min,$max,$avg) = ($1,$2,$3));
};
close (PING);

print "ping_sent:$snt ping_recv:$rcv ping_lost:$lst ping_pct:$pct ping_min:$min ping_max:$max ping_avg:$avg";
^
chkaotic
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests