Just out of curiousity I fooled around with this a bit last night.  Seems easy enough to implement as an external test, if you're OK with having an extra column show up.  Or maybe make a combo with something else, though I've never tried that at all.<br>
<br>========== client side:  /home/xymon/client/ext/osver.sh ==========<br><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div>#!/bin/bash</div><div><br></div><div># column name to report</div><div>
TEST="osver"</div><div><br></div><div># our current os version</div><div>CURVER=`uname -r`</div><div><br></div><div># the logfetch cfg file is filled by xymonclient.sh</div><div>LOGFETCH=${XYMONTMP}/logfetch.$(uname -n).cfg</div>
<div><br></div><div># Default to OK</div><div>COLOR=green</div><div>MESSAGE="No OS version specified in client-local.cfg.  OS version is: $CURVER"</div><div><br></div><div># anything interesting for us?</div><div>
if [ -f "$LOGFETCH" ]; then</div><div>  OSVER=`grep "^OSVER:" $LOGFETCH | cut -d":" -f2`</div><div>  if [ "$OSVER" ]; then</div><div>    # found OSVER in the cfg</div><div>    if [ "$CURVER" = "$OSVER" ]; then</div>
<div>      COLOR=green</div><div>      MESSAGE="OS version is correct: $OSVER"</div><div>    else</div><div>      # report mismatch</div><div>      COLOR=yellow</div><div>      MESSAGE="OS version is incorrect.  $CURVER should be $OSVER"</div>
<div>    fi</div><div>  fi</div><div>fi</div><div><br></div><div>$XYMON $XYMSRV "status $MACHINE.$TEST $COLOR `date`</div><div><br></div><div>$MESSAGE"</div><div><br></div><div>exit 0</div></div><div><br></div></blockquote>
========= client side: /home/xymon/client/etc/clientlaunch.cfg ==========<br><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div>[osver]</div></div><div>ENVFILE $XYMONCLIENTHOME/etc/xymonclient.cfg</div>
<div>CMD $XYMONCLIENTHOME/ext/osver.sh </div><div>LOGFILE $XYMONCLIENTLOGS/osver.log</div><div>INTERVAL 5m</div></blockquote><div><br></div><div>========== server side: /home/xymon/server/etc/client-local.cfg ==========</div>
<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div>[linux]</div>OSVER:2.6.32-131.21.1.el6.x86_64<br></blockquote><div><br></div>Obviously you would append the above line to any system-specific client-local.cfg entries.<div>
<br></div><div>The same approach works for *any* config value that you might want to pass from the server to the clients for client/ext scripts.  I imagine there are probably some limitations on what special characters can be passed, but simple name/value pairs ought to be just fine.</div>
<div><br></div><div>Ralph Mitchell</div><div><br></div><div><br><div class="gmail_quote">On Fri, Dec 2, 2011 at 5:58 PM, Xymon User in Richmond <span dir="ltr"><<a href="mailto:hobbit@epperson.homelinux.net">hobbit@epperson.homelinux.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On Fri, December 2, 2011 14:48, McGraw, Robert P wrote:<br>
> Xymon's "info" column for a host already reports<br>
> the uname -r value. For example, on hardy, the<br>
> info page shows<br>
><br>
> OS: Linux <a href="http://hardy.math.purdue.edu" target="_blank">hardy.math.purdue.edu</a> 2.6.18-274.7.1.el5xen x86_64<br>
><br>
> Question: is Xymon able to let us specify<br>
> somewhere (client-local.cfg maybe?) what<br>
> the current kernel version *should* be,<br>
> so that when the current kernel is<br>
> supposed to be 2.6.18-274.7.1 then we<br>
> can have the info column go yellow or<br>
> red for hosts that haven't been booted to<br>
> that version yet?<br>
><br>
<br>
</div>If what you're after is essentially running kernel doesn't match kernel<br>
that will run on next boot, should be a fairly trivial ext script to<br>
compare contents of uname -r to grubby --default-kernel|sed<br>
"s/\/boot\/vmlinuz-//".  That would be how to do it on Red Hat, looks like<br>
you'd also have to massage uname -r for hardy.<br>
<br>
Don't know if it's already been done.<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<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>
</div></div></blockquote></div><br></div>