<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1057359391;
        mso-list-type:hybrid;
        mso-list-template-ids:-933580530 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body bgcolor=white lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='color:#1F497D'>Thanks Japheth!<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>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:<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span style='color:#1F497D'><span style='mso-list:Ignore'>1.<span style='font:7.0pt "Times New Roman"'>       </span></span></span><![endif]><span style='color:#1F497D'>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.<o:p></o:p></span></p><p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span style='color:#1F497D'><span style='mso-list:Ignore'>2.<span style='font:7.0pt "Times New Roman"'>       </span></span></span><![endif]><span style='color:#1F497D'>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.<o:p></o:p></span></p><p class=MsoListParagraph><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>EXPIRESTRING="`whois $DOMAIN | egrep -i "Expires.*:|Expiration.*:|Renewal.*:|Expires on" | head -n 1 | cut -d: -f2 | cut -dT -f1`"<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>      EXPIRES=`date --date="$EXPIRESTRING" "+%s"`<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>      if test $EXPIRES -le $ALARMTIME<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>      then<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>         COLOR=red<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>        DOTCOLOR='&red'<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>      elif test $EXPIRES -le $WARNTIME<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>      then<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>         COLOR=yellow<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>        DOTCOLOR='&yellow'<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>      else<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>         COLOR=green<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>        DOTCOLOR='&green'<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>      fi<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>      DOM=`echo $DOMAIN | sed -e 's/\./,/g'`<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>      $BB $BBDISP "status+12h $DOM.dnsreg $COLOR `date`<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>      $DOTCOLOR Domain $DOMAIN expires on: $EXPIRESTRING<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'> Japheth Cleaver [mailto:cleaver@terabithia.org] <br><b>Sent:</b> Friday, September 25, 2015 6:22 PM<br><b>To:</b> steuer@hotmail.com; xymon@xymon.com<br><b>Subject:</b> Re: [Xymon] Color Status GIF for host status page<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>On 9/25/2015 2:36 PM, Rob Steuer wrote:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal>Hi, <o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>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.<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>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%.<o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal>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?  <o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p> </o:p></span></p></blockquote><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'>Rob,<br><br>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.<br><br>HTH,<br>-jc<o:p></o:p></span></p></div></body></html>