<div dir="ltr"><div><div><div>I put his together sometime back.<br></div>It's not perfect, but it gives a reasonable indication of what's happening.<br></div>Might be a good place to start, or at very least give you some ideas.<br>
<a href="https://wiki.xymonton.org/doku.php/monitors:diskstat.ksh">https://wiki.xymonton.org/doku.php/monitors:diskstat.ksh</a><br></div>It's Solaris specific, but there is one for Linux, written by Wim Nelis, in perl.<br>
<a href="https://wiki.xymonton.org/doku.php/monitors:diskstat.pl">https://wiki.xymonton.org/doku.php/monitors:diskstat.pl</a><br><br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 30 January 2014 08:55, Jeremy Laidman <span dir="ltr"><<a href="mailto:jlaidman@rebel-it.com.au" target="_blank">jlaidman@rebel-it.com.au</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div class="im">On 30 January 2014 09:55, Lists <span dir="ltr"><<a href="mailto:lists@benjamindsmith.com" target="_blank">lists@benjamindsmith.com</a>></span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Recently, we had a publicly visible outtage as a result of one of our load balancers exceeding the IOPS capability of its system drives.</blockquote>



<div><br></div></div><div>Ouch!</div><div class="im"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
 We'd like to extend xymon (currently installed on CentOS6 /32 with defaults) so that it can monitor IOPS for all servers.<br>


</blockquote><div><br></div></div><div>I like this idea.  I looked into this quite a while ago, but really only scratched the surface.</div><div class="im"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">



Specifically, we'd like to see wrqm/s and probably %util. What's the most straightforward way to accomplish this? The other alternative is to create some form of internal script, which is doable but not preferable if there's an off-the-shelf tool available.<br>



</blockquote><div><br></div></div><div>Whether an add-on or a new Xymon feature, this would almost certainly require a new section in the client data.  There's already an [iostatdisk] section used by Solaris and an [iostat] section used by "larrd", although the format for the latter is a bit funky.  So you could replicate either of these for Linux by adding this into xymonclient-linux.sh:</div>


<div><br>
</div><div><div>nohup sh -c "iostat -x 300 2 1>$XYMONTMP/xymon_iostatdisk.$MACHINEDOTS.$$ 2>&1; mv $XYMONTMP/xymon_iostatdisk.$MACHINEDOTS.$$ $XYMONTMP/xymon_iostatdisk.$MACHINEDOTS" </dev/null >/dev/null 2>&1 &</div>



<div>if test -f $XYMONTMP/xymon_iostatdisk.$MACHINEDOTS; then echo "[iostatdisk]"; cat $XYMONTMP/xymon_iostatdisk.$MACHINEDOTS; rm -f $XYMONTMP/xymon_iostatdisk.$MACHINEDOTS; fi</div></div><div><br></div><div>We might want "-kx" rather than "-x" depending on potential uses.  But doesn't matter for %util and wrqm/s.  Adding "-N" (for translating device names to LVM mappings) might also be useful.</div>


<div><br></div><div>The Xymon parsing code has support only for Solaris.  That means it isn't readily extensible.  For other client data sections, the parsing code typically has a case statement that selects the OS and then parses according to that.  Not the case for iostatdisk or iostat.</div>


<div><br></div><div>In fact, the function that does the parsing - do_iostatdisk_rrd() - is never called anywhere.  So there's a fair bit of work required within Xymon to get it to work.  I'd suggest we get the client side going, then writing a server-side ext script to emulate the parsing code (feeding into a trends message for RRD), and then start work on core support for iostatdisk within xymond.</div>


<div><br></div><div>It's probably a bit more complicated than that.  Henrik may have a vision for universal support of I/O statistics which may be incompatible with what I'm proposing.  Also, we would probably want to maintain compatibility with the existing [iostat] graph.cfg definition (the only one that uses the iostat/iostatdisk results), and that means creating RRD files that are consistent with the DS names and purposes already in use.  Also, we may find that metrics we want to graph are inconsistent with metrics already defined for the Solaris case that already exists.  Also, we'd need to define a new graph to show the numbers you're interested in, because the [iostat] graph only shows active/wait service times and %busy.  I think %busy is analogous to %util.</div>


<div><br></div><div>Implementing this kind of thing in such a way that it supports the majority of OSes, without too much effort, and without significant conflicts, is quite a challenge.  I suspect that's the reason we don't have anything in the way of I/O usage in Xymon.  I've often wondered if using "sar" is a better way to go, because the output is more (but not completely) consistent across platforms, and so the parsing code would be simpler and smaller.  Sar is now available on more OSes than ever before, so we're more likely to see support from hosts we monitor.  Clients would just do a few standard "sar" commands to create client data sections (eg [sar-d] [sar-b], or even [sar-A] for all available output) and Xymon would implement a small handful of standardised "sar" parsers.  Just an idea.</div>
<span class="HOEnZb"><font color="#888888">

<div><br></div><div>J<br></div><div><br></div></font></span></div></div>
</div>
<br>_______________________________________________<br>
Xymon mailing list<br>
<a href="mailto:Xymon@xymon.com">Xymon@xymon.com</a><br>
<a href="http://lists.xymon.com/mailman/listinfo/xymon" target="_blank">http://lists.xymon.com/mailman/listinfo/xymon</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><span>"Accept the challenges so that you can feel the exhilaration of victory"</span><div><span>- General George Patton</span></div>
</div>