changed:
-
Okay, here's how to get some better latency graphs in zenoss. You can get something like:
<br /><br />
<img src="http://204.14.152.10/betterping.png"><br /><br />
<img src="http://204.14.152.10/betterping1.png"><br /><br /><br />
This has only been tested on Ubuntu 7.10, and will probably need some tweaking to work on other platforms. Don't blame me if it doesn't work for you, just learn how to use sed and fix it accordingly.
<br /><br />
Here's how you do it:
<br /><br />
<ol>
<li>Create a new template, give it a name.</li>
<li>Create a new Datasource of "command" type.</li>
<ul>
<li>Set the Event Class to "/Cmd"</li>
<li>Set the Command Template as: <code>/bin/ping -n -q -c 3 $devname | sed -n -e '/loss/p' -e '/rtt/p' | sed -e 's/.*\([0-9].*.% packet loss\).*/PING OK|loss=\1/;s/[0-9] received//;s/%//;s/, //;s/packet loss//' -e 's/rtt min\/avg\/max\/mdev = /min=/;s/ ms//;s/\// avg=/;s/\// max=/;s/\// mdev=/' | sed '/$$/ {;N;s/\n//}'</code></li>
</ul>
<li>You may want to change the -c flag to something higher if you want to send out more pings and get a more informative graph. Just make sure you can handle the extra load!</li>
<li>Add the following Datapoints, leaving the default options for everything</li>
<ul>
<li>avg</li>
<li>min</li>
<li>max</li>
<li>mdev</li>
<li>loss</li>
</ul>
<li>Go to the top level of your template.</li>
<li>Add a new Graph Defintion and give it a name (i.e. Latency).</li>
<li>Set Units to ms and click on save</li>
<li>Add Graph Points for each Datapoint (except loss), and change the graph views if you want to.</li>
<li>Create another graph for Packet Loss.</li>
<li>Bind the template to some device classes and watch the graphs grow!</li>
</ol>
<br /><br /><br />
<p>As per request, I use the following settings for the graph points on the first graph above:
<ol>
<li>0) round trip average - area, #FF4500</li>
<li>1) round trip max - area, #FFA07A</li>
<li>2) mean deviation - line with width of 2,#010101</li>
<li>3) round trip min - area, #CD1200</li>
</p>