[Xymon] Color Status GIF for host status page

Rob Steuer steuer at hotmail.com
Sat Sep 26 04:12:41 CEST 2015

Thanks Japheth!


>From your hint I was able to modify my script to do what I wanted.  So let me share now, maybe this will help others.  As an example, using the dnsreg.sh script, I’ve modified 2 things:


1.       With the widely published dnsreg.sh script, the EXPIRESTRING was showing like this for me: 2015-09-25T14 because it used a : as a delimiter, I removed the sed command and added an additional cut command using T as a delimiter so it only grabbed the actual date part.

2.       Thanks to your hint, I added the DOTCOLOR commands in each part of the IF statement.  Also in the last line I prefix with $DOTCOLOR so now it shows the colored icon in the detailed status page.



EXPIRESTRING="`whois $DOMAIN | egrep -i "Expires.*:|Expiration.*:|Renewal.*:|Expires on" | head -n 1 | cut -d: -f2 | cut -dT -f1`"


      EXPIRES=`date --date="$EXPIRESTRING" "+%s"`


      if test $EXPIRES -le $ALARMTIME




      elif test $EXPIRES -le $WARNTIME









      DOM=`echo $DOMAIN | sed -e 's/\./,/g'`

      $BB $BBDISP "status+12h $DOM.dnsreg $COLOR `date`


      $DOTCOLOR Domain $DOMAIN expires on: $EXPIRESTRING


From: Japheth Cleaver [mailto:cleaver at terabithia.org] 
Sent: Friday, September 25, 2015 6:22 PM
To: steuer at hotmail.com; xymon at xymon.com
Subject: Re: [Xymon] Color Status GIF for host status page


On 9/25/2015 2:36 PM, Rob Steuer wrote:



I’ve tried to figure this out, but I need help at this point.  What I’m trying to figure out is how to add a colored GIF status image to a detailed host page.


For example, when looking at built in pages like Memory, Disk, Etc. The individual items show a small colored GIF image, green,yellow,red prior to the item [green gif] Physical: 80%.


I’ve setup the UPS monitoring using devmon and the dnsreg script and while if I click on those pages it shows a green column/bar all the way to the left, it doesn’t show a green gif dot image next to the item that is tested.  How can this be added?  I’ve looked at the analysis.cfg and thought I was getting close, but I think it must be set/configured in some other way, it is defined on the client or the Xymon server and where?  




I can't speak to devmon *specifically* but generically speaking, the contents of the status message are controlled by the sender. The hard way to put it in would be to add the HTML IMG tag by hand, but fortunately there's an easier method :) Adding a '&red', '&yellow' or other &color to your status message on a line will cause the web interface to insert the appropriate color GIF for you automatically.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20150925/5cb24a68/attachment.html>

More information about the Xymon mailing list