<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    I've spent some time using DRBD over the past few years, and have
    been slowly fixing how Xymon monitors that. I was hoping to share my
    work on xymonton, but while I've created an account, I'm not
    familiar with a dokuwiki, or how to create pages/etc.<br>
    <br>
    In any case, I'm not finished yet, so I'll post what I have so far,
    and perhaps someone else can upload for me, and/or discuss specific
    improvements.... One specific issue is that I am still using
    "Hobbit", rather than xymon, so a number of variable names,
    filenames, etc should probably be updated.<br>
    <br>
    The first tool I use is a perl script "check-drbd", I think I
    borrowed this from a nagios plugin or similar, but I have made
    significant modifications to it since then (see attached)<br>
    <br>
    The second tool is a shell script called drbd, this simply calls the
    check-drbd, and then reports the data back to xymon, as both a
    status message (to display on screen) as well as a data message (to
    save into the rrd files).<br>
    <br>
    Also, the file for the client to actually run the script
    clientlaunch_drbd.cfg<br>
    <br>
    Finally, on the server side, we have the graph definition for the
    hobbitgraph.d directory, which allows to see graphs of the data over
    time (very useful) in the file hobbitgraph_drbd.cfg<br>
    <br>
    Some things I would like to change/fix are:<br>
    1) to limit the graph to only one drbd device per graph. (There
    aren't enough colours, and the graphs are too messy to read anyway).<br>
    2) be able to graph all drbd devices on one graph, but only one of
    the values. eg, see all dw values on a single graph<br>
    3) be able to graph the sum of all the values, eg, similar to 2 (so
    only all the dw values at once) but stacked so I can see each
    individual colour as well as the total<br>
    <br>
    I'm not sure the best way to make the above happen. I suppose I
    could create another dozen graph definitions, but I'm hoping there
    might be a better way.<br>
    <br>
    Finally, now that the data is being added to the rrd, when I
    eventually upgrade to a current release, I'll be able to do alerts
    based on the values (eg, oos is too high - or non zero basically, or
    dw is too high and therefore users will be seeing slow performance,
    etc).<br>
    <br>
    Comments, suggestions, etc, greatly appreciated. If nothing else, I
    hope this will be useful to someone else.<br>
    <br>
    Effectively, this will display the data on the page like this (I
    have 18 drbd devices configured, 0 to 18 skipping 12):<br>
    <br>
    <h3> Fri Feb 6 13:27:03 AEDT 2015 DRBD OK 0 [OK], 1 [OK], 2 [OK], 3
      [OK], 4 [OK], 5 [OK], 6 [OK], 7 [OK], 8 [OK], 9 [OK], 10 [OK], 11
      [OK], 13 [OK], 14 [OK], 15 [OK], 16 [OK], 17 [OK], 18 [OK]</h3>
    <pre>drbd0 ns:59995764 nr:587 dw:59996747 dr:13440670 al:4315 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 oos:0
drbd1 ns:51177927 nr:1147 dw:51179332 dr:50184219 al:10914 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 oos:0
drbd2 ns:10390318 nr:0 dw:10390318 dr:17007325 al:2637 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 oos:0
drbd3 ns:473465956 nr:17032 dw:473475648 dr:1713963052 al:1850433 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 oos:0
drbd4 ns:5958452 nr:124 dw:5958580 dr:5663626 al:212 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 oos:0
drbd5 ns:413987326 nr:1531 dw:413989393 dr:245985408 al:158935 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 oos:0
drbd6 ns:17089136 nr:251116 dw:17342180 dr:116599072 al:1211 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 oos:0
drbd7 ns:0 nr:0 dw:0 dr:5662844 al:0 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 oos:0
drbd8 ns:63714682 nr:563 dw:63715479 dr:23877551 al:6582 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 oos:0
drbd9 ns:186293485 nr:362 dw:186293990 dr:480836789 al:59641 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 oos:0
drbd10 ns:59817651 nr:366 dw:59818057 dr:27584750 al:12039 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 oos:0
drbd11 ns:0 nr:0 dw:0 dr:664 al:0 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 oos:0
drbd13 ns:726120198 nr:474 dw:726126470 dr:1029163787 al:3647825 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 oos:0
drbd14 ns:783916639 nr:676 dw:783924754 dr:1103495545 al:4256267 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 oos:0
drbd15 ns:166529805 nr:0 dw:166529921 dr:83674337 al:139032 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 oos:0
drbd16 ns:0 nr:0 dw:0 dr:5661172 al:0 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 oos:0
drbd17 ns:1625540 nr:0 dw:1625540 dr:6601790 al:82 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 oos:0
drbd18 ns:56091131 nr:705 dw:56091944 dr:37456802 al:77287 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 oos:0

</pre>
    I was going to include the image, but it is 241k... take a look at:<br>
    <img alt="graph image of drbd stats"
      src="http://www.websitemanagers.com.au/support/hobbitgraph.png"
      moz-do-not-send="true" height="3721" width="673"><br>
    <br>
    Note, all attachments are tar + bzip2, reducing the original 44k
    down to 4k...<br>
    <br>
    Regards,<br>
    Adam<br>
    <pre class="moz-signature" cols="72">-- 
Adam Goryachev
Website Managers
Ph: +61 2 8304 0000                            <a class="moz-txt-link-abbreviated" href="mailto:adam@websitemanagers.com.au">adam@websitemanagers.com.au</a>
Fax: +61 2 8304 0001                            <a class="moz-txt-link-abbreviated" href="http://www.websitemanagers.com.au">www.websitemanagers.com.au</a>
</pre>
  </body>
</html>