<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" 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"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16587" name=GENERATOR><!--[if !mso]>
<STYLE>v\:* {
        BEHAVIOR: url(#default#VML)
}
o\:* {
        BEHAVIOR: url(#default#VML)
}
w\:* {
        BEHAVIOR: url(#default#VML)
}
.shape {
        BEHAVIOR: url(#default#VML)
}
</STYLE>
<![endif]-->
<STYLE>@font-face {
        font-family: Calibri;
}
@font-face {
        font-family: Tahoma;
}
@font-face {
        font-family: Consolas;
}
@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.0in 1.0in 1.0in; }
P.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman","serif"
}
LI.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman","serif"
}
DIV.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman","serif"
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline; mso-style-priority: 99
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline; mso-style-priority: 99
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline; mso-style-priority: 99
}
P {
        FONT-SIZE: 12pt; MARGIN-LEFT: 0in; MARGIN-RIGHT: 0in; FONT-FAMILY: "Times New Roman","serif"; mso-style-priority: 99; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto
}
PRE {
        FONT-SIZE: 10pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Courier New"; mso-style-priority: 99; mso-style-link: "HTML Preformatted Char"
}
SPAN.HTMLPreformattedChar {
        FONT-FAMILY: Consolas; mso-style-priority: 99; mso-style-link: "HTML Preformatted"; mso-style-name: "HTML Preformatted Char"
}
SPAN.EmailStyle21 {
        COLOR: #1f497d; FONT-FAMILY: "Calibri","sans-serif"; mso-style-type: personal-reply
}
.MsoChpDefault {
        FONT-SIZE: 10pt; mso-style-type: export-only
}
DIV.Section1 {
        page: Section1
}
</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 lang=EN-US vLink=purple link=blue bgColor=white>
<DIV dir=ltr align=left><SPAN class=834554110-29052008><FONT face=Tahoma 
color=#0000ff size=2>Hi again Ryan,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=834554110-29052008><FONT face=Tahoma 
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=834554110-29052008><FONT face=Tahoma 
color=#0000ff size=2>Are you testing via the standard hobbit alerting or from a 
shell?  If the latter, it may be because the RECOVERED environment is not 
set.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=834554110-29052008><FONT face=Tahoma 
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=834554110-29052008><FONT face=Tahoma 
color=#0000ff size=2>You could try changing the entry on line 30 to read 
${RECOVERED:=1} so that it has a value of 1 if it is not set (although you will 
probably then run into further problems with BBCOLORLEVEL and BBALPHAMSG as 
well!).</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=834554110-29052008><FONT face=Tahoma 
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=834554110-29052008><FONT face=Tahoma 
color=#0000ff size=2>Otherwise, you will probably have to set the first line to 
"#!/bin/bash -x" to get more detailed output of what the script is up to in the 
logs.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=834554110-29052008><FONT face=Tahoma 
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=834554110-29052008><FONT face=Tahoma 
color=#0000ff size=2>Andy.</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Ryan Jay B. Lapuz 
[mailto:rlapuz@fcpp.fujitsu.com] <BR><B>Sent:</B> Monday, 26 May 2008 12:05 
p.m.<BR><B>To:</B> hobbit@hswn.dk<BR><B>Subject:</B> Re: [hobbit] alert 
question<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><FONT face=Arial size=2>Hi Galen,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I also use bash, (#!/bin/bash). My hobbit is 
version 2.4.0 w/ all-in-one patch and is installed in Fedora Core 6</FONT></DIV>
<DIV><FONT face=Arial size=2>Thanks in advance!</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV>----- Original Message ----- </DIV>
<BLOCKQUOTE dir=ltr 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=Galen.Johnson@sas.com href="mailto:Galen.Johnson@sas.com">Galen 
  Johnson</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=hobbit@hswn.dk 
  href="mailto:hobbit@hswn.dk">hobbit@hswn.dk</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Saturday, May 24, 2008 10:24 
  PM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> RE: [hobbit] alert 
question</DIV>
  <DIV><BR></DIV>
  <DIV class=Section1>
  <P class=MsoNormal><SPAN 
  style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">What 
  shell have you set this to run as?  Andy is using 
  bash…(#!/opt/csw/bi/bash)<o:p></o:p></SPAN></P>
  <P class=MsoNormal><SPAN 
  style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><o:p> </o:p></SPAN></P>
  <P class=MsoNormal><SPAN 
  style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'">=G=<o:p></o:p></SPAN></P>
  <P class=MsoNormal><SPAN 
  style="FONT-SIZE: 11pt; COLOR: #1f497d; FONT-FAMILY: 'Calibri','sans-serif'"><o:p> </o:p></SPAN></P>
  <DIV>
  <DIV 
  style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; PADDING-LEFT: 0in; PADDING-BOTTOM: 0in; BORDER-LEFT: medium none; PADDING-TOP: 3pt; BORDER-BOTTOM: medium none">
  <P class=MsoNormal><B><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Tahoma','sans-serif'">From:</SPAN></B><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Tahoma','sans-serif'"> Ryan Jay B. Lapuz 
  [mailto:rlapuz@fcpp.fujitsu.com] <BR><B>Sent:</B> Saturday, May 24, 2008 5:18 
  AM<BR><B>To:</B> <A 
  href="mailto:hobbit@hswn.dk">hobbit@hswn.dk</A><BR><B>Subject:</B> Re: 
  [hobbit] alert question<o:p></o:p></SPAN></P></DIV></DIV>
  <P class=MsoNormal><o:p> </o:p></P>
  <DIV>
  <P class=MsoNormal><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">Hi Andy, 
  </SPAN><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal> <o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">There is a problem 
  with my implementation, please refer to the logs 
  below:</SPAN><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal> <o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><STRONG><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">error:</SPAN></STRONG><B><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"><BR></SPAN></B><SPAN 
  style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Arial','sans-serif'">./htmlmail: 
  line 30: [: =: unary operator expected</SPAN><o:p></o:p></P></DIV>
  <DIV>
  <P class=MsoNormal><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"><BR><STRONG><SPAN 
  style="FONT-FAMILY: 'Arial','sans-serif'">htmlmail:</SPAN></STRONG><BR>(start 
  of line 30)<BR><SPAN style="COLOR: red">if [ ${RECOVERED} = 1 
  ]<BR>then<BR>        export 
  BBCOLORLEVEL="RECOVERED"<BR>        export 
  BBCOLOR="green"<BR>else<BR>        export 
  BBCOLOR=$BBCOLORLEVEL<BR>fi</SPAN><o:p></o:p></SPAN></P></DIV>
  <DIV>
  <P class=MsoNormal><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"> <o:p></o:p></SPAN></P></DIV>
  <DIV>
  <P class=MsoNormal><SPAN 
  style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Arial','sans-serif'"># 
  Convert plain line breaks to HTML breaks</SPAN><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"><o:p></o:p></SPAN></P></DIV>
  <DIV>
  <P class=MsoNormal><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"> <o:p></o:p></SPAN></P></DIV>
  <DIV>
  <P class=MsoNormal><SPAN 
  style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Arial','sans-serif'"># 
  export BBALPHAMSG="`echo \"$BBALPHAMSG\" | sed 
  '/>$/!s/$/<BR>/'`"</SPAN><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"><o:p></o:p></SPAN></P></DIV>
  <DIV>
  <P class=MsoNormal><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"> <o:p></o:p></SPAN></P></DIV>
  <DIV>
  <P class=MsoNormal><SPAN 
  style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Arial','sans-serif'"># 
  Convert Hobbit colour tags to embedded image tags</SPAN><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"><o:p></o:p></SPAN></P></DIV>
  <DIV>
  <P class=MsoNormal><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"> <o:p></o:p></SPAN></P></DIV>
  <DIV>
  <P class=MsoNormal><SPAN 
  style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Arial','sans-serif'">export 
  BBALPHAMSG="`echo \"$BBALPHAMSG\" | sed 's/&blue/<img 
  src="cid:blue.gif">/g'`"<BR>export BBALPHAMSG="`echo \"$BBALPHAMSG\" | sed 
  's/&clear/<img src="cid:clear.gif">/g'`"<BR>export BBALPHAMSG="`echo 
  \"$BBALPHAMSG\" | sed 's/&green/<img 
  src="cid:green.gif">/g'`"<BR>export BBALPHAMSG="`echo \"$BBALPHAMSG\" | sed 
  's/&purple/<img src="cid:purple.gif">/g'`"<BR>export 
  BBALPHAMSG="`echo \"$BBALPHAMSG\" | sed 's/&red/<img 
  src="cid:red.gif">/g'`"<BR>export BBALPHAMSG="`echo \"$BBALPHAMSG\" | sed 
  's/&unknown/<img src="cid:unknown.gif">/g'`"<BR>export 
  BBALPHAMSG="`echo \"$BBALPHAMSG\" | sed 's/&yellow/<img 
  src="cid:yellow.gif">/g'`"</SPAN><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"><o:p></o:p></SPAN></P></DIV>
  <DIV>
  <P class=MsoNormal><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"> <o:p></o:p></SPAN></P></DIV>
  <DIV>
  <P class=MsoNormal><SPAN 
  style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Arial','sans-serif'"># Fix 
  link at base of message as they are removed in PLAIN format</SPAN><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"><o:p></o:p></SPAN></P></DIV>
  <DIV>
  <P class=MsoNormal><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"> <o:p></o:p></SPAN></P></DIV>
  <DIV>
  <P class=MsoNormal><SPAN 
  style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Arial','sans-serif'">export 
  BBALPHAMSG="`echo \"$BBALPHAMSG\" | sed 's|http:.*|<a 
  href="&">&</a>|g'`"</SPAN><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"><o:p></o:p></SPAN></P></DIV>
  <DIV>
  <P class=MsoNormal><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"> <o:p></o:p></SPAN></P></DIV>
  <DIV>
  <P class=MsoNormal><SPAN 
  style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Arial','sans-serif'"># Run 
  Perl script to generate email</SPAN><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"><o:p></o:p></SPAN></P></DIV>
  <DIV>
  <P class=MsoNormal><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"> <o:p></o:p></SPAN></P></DIV>
  <DIV>
  <P class=MsoNormal><SPAN 
  style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Arial','sans-serif'">/home/hobbit/server/bin/htmlmail.pl 
  > /dev/null 2>&1</SPAN><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"><o:p></o:p></SPAN></P></DIV>
  <DIV>
  <P class=MsoNormal><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"> <o:p></o:p></SPAN></P></DIV>
  <DIV>
  <P class=MsoNormal><STRONG><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">/var/log/hobbit/page.log:</SPAN></STRONG><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"><BR><SPAN 
  style="COLOR: red">Paging script /home/hobbit/server/bin/htmlmail terminated 
  with status 2</SPAN><o:p></o:p></SPAN></P></DIV>
  <DIV>
  <P class=MsoNormal><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"> <o:p></o:p></SPAN></P></DIV>
  <DIV>
  <P class=MsoNormal><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">What seems to be 
  the problem?<o:p></o:p></SPAN></P></DIV>
  <DIV>
  <P class=MsoNormal><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"> <o:p></o:p></SPAN></P></DIV>
  <DIV>
  <P class=MsoNormal><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">Thanks in 
  advance!<o:p></o:p></SPAN></P></DIV>
  <DIV>
  <P class=MsoNormal><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"> <o:p></o:p></SPAN></P></DIV>
  <DIV>
  <P class=MsoNormal><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">Regards,<o:p></o:p></SPAN></P></DIV>
  <DIV>
  <P class=MsoNormal><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">Ryan</SPAN><o:p></o:p></P></DIV>
  <BLOCKQUOTE 
  style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 4pt; PADDING-BOTTOM: 0in; MARGIN: 5pt 0in 5pt 3.75pt; BORDER-LEFT: black 1.5pt solid; PADDING-TOP: 0in; BORDER-BOTTOM: medium none">
    <DIV>
    <P class=MsoNormal><SPAN 
    style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">----- Original 
    Message ----- <o:p></o:p></SPAN></P></DIV>
    <DIV>
    <P class=MsoNormal style="BACKGROUND: #e4e4e4"><B><SPAN 
    style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">From:</SPAN></B><SPAN 
    style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"> <A 
    title=Andy@zespri.com href="mailto:Andy@zespri.com">Andy France</A> 
    <o:p></o:p></SPAN></P></DIV>
    <DIV>
    <P class=MsoNormal><B><SPAN 
    style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">To:</SPAN></B><SPAN 
    style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"> <A 
    title=hobbit@hswn.dk href="mailto:hobbit@hswn.dk">hobbit@hswn.dk</A> 
    <o:p></o:p></SPAN></P></DIV>
    <DIV>
    <P class=MsoNormal><B><SPAN 
    style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">Sent:</SPAN></B><SPAN 
    style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"> Friday, May 23, 
    2008 11:32 AM<o:p></o:p></SPAN></P></DIV>
    <DIV>
    <P class=MsoNormal><B><SPAN 
    style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">Subject:</SPAN></B><SPAN 
    style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"> RE: [hobbit] 
    alert question<o:p></o:p></SPAN></P></DIV>
    <DIV>
    <P class=MsoNormal><o:p> </o:p></P></DIV>
    <P class=MsoNormal><SPAN 
    style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Tahoma','sans-serif'">Hi 
    Ryan,</SPAN><o:p></o:p></P>
    <P class=MsoNormal> <o:p></o:p></P>
    <P class=MsoNormal><SPAN 
    style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Tahoma','sans-serif'">Here's 
    what I use, in three parts:</SPAN><o:p></o:p></P>
    <P class=MsoNormal> <o:p></o:p></P>
    <P class=MsoNormal><STRONG><SPAN 
    style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Tahoma','sans-serif'">FIRST:</SPAN></STRONG><SPAN 
    style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Tahoma','sans-serif'">  
    The mail script /opt/hobbit/bin/htmlmail</SPAN><o:p></o:p></P>
    <BLOCKQUOTE 
      style="MARGIN-TOP: 5pt; MARGIN-BOTTOM: 5pt; MARGIN-RIGHT: 0in"><P 
      class=MsoNormal><SPAN 
      style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">#!/opt/csw/bin/bash<BR>#<BR># 
      Script get the following environment variables pre-defined so<BR># that 
      they can send a meaningful alert:<BR>#<BR>#    
      BBCOLORLEVEL  - The current color of the 
      status<BR>#    BBALPHAMSG    - The full text 
      of the status log triggering the alert<BR>#    
      ACKCODE       - The "cookie" that can be 
      used to acknowledge the alert<BR>#    
      RCPT          - The 
      recipient, from the SCRIPT entry<BR>#    
      BBHOSTNAME    - The name of the host that the alert is 
      about<BR>#    
      MACHIP        - The IP-address of the 
      host that has a problem<BR>#    
      BBSVCNAME     - The name of the service that the alert 
      is about<BR>#    BBSVCNUM      - 
      The numeric code for the service. From SVCCODES 
      definition.<BR>#    BBHOSTSVC     - 
      HOSTNAME.SERVICE that the alert is about.<BR>#    
      BBHOSTSVCCOMMAS - As BBHOSTSVC, but dots in the hostname replaced with 
      commas<BR>#    BBNUMERIC     - A 
      22-digit number made by BBSVCNUM, MACHIP and 
      ACKCODE.<BR>#    RECOVERED     - Is "1" 
      if the service has recovered.<BR>#    
      EVENTSTART    - Timestamp when the current status (color) 
      began<BR>#    DOWNSECS      - 
      Number of seconds the service has been down.<BR>#    
      DOWNSECSMSG   - When recovered, holds the text "Event duration : 
      N" 
      where<BR>#                    
      N is the DOWNSECS value.<BR>#    
      CFID          - Line-number 
      in the hobbit-alerts.cfg file that caused the script to be 
      invoked.<BR>#                    
      Can be useful when troubleshooting alert configuration 
      rules</SPAN><o:p></o:p></P>
      <DIV>
      <P class=MsoNormal> <o:p></o:p></P></DIV>
      <P class=MsoNormal><SPAN 
      style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">#<BR># 
      Minumum hobbit-alerts.cfg entry -<BR># SCRIPT /opt/hobbit/bin/htmlmail 
      support FORMAT=PLAIN<BR>#</SPAN><o:p></o:p></P>
      <DIV>
      <P class=MsoNormal> <o:p></o:p></P></DIV>
      <P class=MsoNormal><SPAN 
      style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">if [ 
      ${RECOVERED} = 1 ]<BR>then<BR>        
      export 
      BBCOLORLEVEL="RECOVERED"<BR>        
      export 
      BBCOLOR="green"<BR>else<BR>        
      export BBCOLOR=$BBCOLORLEVEL<BR>fi</SPAN><o:p></o:p></P>
      <DIV>
      <P class=MsoNormal> <o:p></o:p></P></DIV>
      <P class=MsoNormal><SPAN 
      style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"># Convert 
      plain line breaks to HTML breaks</SPAN><o:p></o:p></P>
      <DIV>
      <P class=MsoNormal> <o:p></o:p></P></DIV>
      <P class=MsoNormal><SPAN 
      style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"># export 
      BBALPHAMSG="`echo \"$BBALPHAMSG\" | sed 
      '/>$/!s/$/<BR>/'`"</SPAN><o:p></o:p></P>
      <DIV>
      <P class=MsoNormal> <o:p></o:p></P></DIV>
      <P class=MsoNormal><SPAN 
      style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"># Convert 
      Hobbit colour tags to embedded image tags</SPAN><o:p></o:p></P>
      <DIV>
      <P class=MsoNormal> <o:p></o:p></P></DIV>
      <P class=MsoNormal><SPAN 
      style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">export 
      BBALPHAMSG="`echo \"$BBALPHAMSG\" | sed 's/&blue/<img 
      src="cid:blue.gif">/g'`"<BR>export BBALPHAMSG="`echo \"$BBALPHAMSG\" | 
      sed 's/&clear/<img src="cid:clear.gif">/g'`"<BR>export 
      BBALPHAMSG="`echo \"$BBALPHAMSG\" | sed 's/&green/<img 
      src="cid:green.gif">/g'`"<BR>export BBALPHAMSG="`echo \"$BBALPHAMSG\" | 
      sed 's/&purple/<img src="cid:purple.gif">/g'`"<BR>export 
      BBALPHAMSG="`echo \"$BBALPHAMSG\" | sed 's/&red/<img 
      src="cid:red.gif">/g'`"<BR>export BBALPHAMSG="`echo \"$BBALPHAMSG\" | 
      sed 's/&unknown/<img src="cid:unknown.gif">/g'`"<BR>export 
      BBALPHAMSG="`echo \"$BBALPHAMSG\" | sed 's/&yellow/<img 
      src="cid:yellow.gif">/g'`"</SPAN><o:p></o:p></P>
      <DIV>
      <P class=MsoNormal> <o:p></o:p></P></DIV>
      <P class=MsoNormal><SPAN 
      style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"># Fix 
      link at base of message as they are removed in PLAIN 
      format</SPAN><o:p></o:p></P>
      <DIV>
      <P class=MsoNormal> <o:p></o:p></P></DIV>
      <P class=MsoNormal><SPAN 
      style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">export 
      BBALPHAMSG="`echo \"$BBALPHAMSG\" | sed 's|http:.*|<a 
      href="&">&</a>|g'`"</SPAN><o:p></o:p></P>
      <DIV>
      <P class=MsoNormal> <o:p></o:p></P></DIV>
      <P class=MsoNormal><SPAN 
      style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"># Run 
      Perl script to generate email</SPAN><o:p></o:p></P>
      <P class=MsoNormal> <o:p></o:p></P>
      <P class=MsoNormal><SPAN 
      style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">/opt/hobbit/bin/htmlmail.pl 
      > /dev/null 2>&1</SPAN><SPAN 
      style="FONT-SIZE: 10pt; COLOR: blue"><o:p></o:p></SPAN></P></BLOCKQUOTE>
    <P class=MsoNormal><STRONG><SPAN 
    style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Tahoma','sans-serif'">SECOND:</SPAN></STRONG><SPAN 
    style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Tahoma','sans-serif'">  
    The perl script to format and send the message 
    /opt/hobbit/bin/htmlmail.pl</SPAN><o:p></o:p></P>
    <BLOCKQUOTE 
      style="MARGIN-TOP: 5pt; MARGIN-BOTTOM: 5pt; MARGIN-RIGHT: 0in"><P 
      class=MsoNormal><SPAN 
      style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">#!/opt/csw/bin/perl 
      -w</SPAN><o:p></o:p></P>
      <DIV>
      <P class=MsoNormal> <o:p></o:p></P></DIV>
      <P class=MsoNormal><SPAN 
      style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">use 
      strict;<BR>use MIME::Lite;</SPAN><o:p></o:p></P>
      <DIV>
      <P class=MsoNormal> <o:p></o:p></P></DIV>
      <P class=MsoNormal><SPAN 
      style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">my $rcpt 
      = $ENV{'RCPT'};<BR>my $bbhostsvc = $ENV{'BBHOSTSVC'};<BR>my $bbcolorlevel 
      = $ENV{'BBCOLORLEVEL'};<BR>my $bbalphamsg = 
      $ENV{'BBALPHAMSG'};</SPAN><o:p></o:p></P>
      <DIV>
      <P class=MsoNormal> <o:p></o:p></P></DIV>
      <P class=MsoNormal><SPAN 
      style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">my 
      $subject = $bbhostsvc . " " . $bbcolorlevel;<BR>my $htmldata = 
      join("",<BR>        "<BODY 
      BGCOLOR=\"#FFFFFF\" TEXT=\"#000000\" LINK=\"#0000FF\" ALINK =\"#FF0000\" 
      VLINK=\"#800080\">\n",<BR>        
      "<FONT FACE=\"Tahoma, Arial, Helvetica\" 
      SIZE=\"3\">\n",<BR>        
      "<PRE>\n",<BR>        
      $bbalphamsg,<BR>        
      "\n",<BR>        
      "</PRE>\n",<BR>        
      "</FONT>\n",<BR>        
      "</BODY>"<BR>);</SPAN><o:p></o:p></P>
      <DIV>
      <P class=MsoNormal> <o:p></o:p></P></DIV>
      <P class=MsoNormal><SPAN 
      style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">my $msg = 
      MIME::Lite->new<BR>(<BR>        
      Subject => $subject,<BR>        
      To      => 
      $rcpt,<BR>        
      Type    => 
      'multipart/related'<BR>);</SPAN><o:p></o:p></P>
      <DIV>
      <P class=MsoNormal> <o:p></o:p></P></DIV>
      <P class=MsoNormal><SPAN 
      style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">$msg->attach<BR>(<BR>        
      Type    => 
      'text/html',<BR>        
      Data    => $htmldata,<BR>);</SPAN><o:p></o:p></P>
      <DIV>
      <P class=MsoNormal> <o:p></o:p></P></DIV>
      <P class=MsoNormal><SPAN 
      style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">if($htmldata 
      =~ m/blue.gif/)<BR>        
      {$msg->attach(Type => 'image/gif', Id => 'blue.gif', Path => 
      '/opt/hobbit/server/www/gifs/blue.gif')}<BR>if($htmldata =~ 
      m/clear.gif/)<BR>        
      {$msg->attach(Type => 'image/gif', Id => 'clear.gif', Path => 
      '/opt/hobbit/server/www/gifs/clear.gif')}<BR>if($htmldata =~ 
      m/green.gif/)<BR>        
      {$msg->attach(Type => 'image/gif', Id => 'green.gif', Path => 
      '/opt/hobbit/server/www/gifs/green.gif')}<BR>if($htmldata =~ 
      m/purple.gif/)<BR>        
      {$msg->attach(Type => 'image/gif', Id => 'purple.gif', Path => 
      '/opt/hobbit/server/www/gifs/purple.gif')}<BR>if($htmldata =~ 
      m/red.gif/)<BR>        
      {$msg->attach(Type => 'image/gif', Id => 'red.gif', Path => 
      '/opt/hobbit/server/www/gifs/red.gif')}<BR>if($htmldata =~ 
      m/yellow.gif/)<BR>        
      {$msg->attach(Type => 'image/gif', Id => 'yellow.gif', Path => 
      '/opt/hobbit/server/www/gifs/yellow.gif')}</SPAN><o:p></o:p></P>
      <DIV>
      <P class=MsoNormal> <o:p></o:p></P></DIV>
      <P class=MsoNormal><SPAN 
      style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">$msg->send();</SPAN><o:p></o:p></P></BLOCKQUOTE>
    <P class=MsoNormal><STRONG><SPAN 
    style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Tahoma','sans-serif'">THIRD:</SPAN></STRONG><SPAN 
    style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Tahoma','sans-serif'">  
    Configure your hobbit-alerts.cfg lines like this:</SPAN><o:p></o:p></P>
    <BLOCKQUOTE 
      style="MARGIN-TOP: 5pt; MARGIN-BOTTOM: 5pt; MARGIN-RIGHT: 0in"><P 
      class=MsoNormal><SPAN 
      style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'">SCRIPT 
      /opt/hobbit/bin/htmlmail <A 
      href="mailto:Someone@nowhere.com">Someone@nowhere.com</A> FORMAT=TEXT</SPAN><o:p></o:p></P></BLOCKQUOTE>
    <P class=MsoNormal><SPAN 
    style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Tahoma','sans-serif'">You 
    will obviously need to adjust all of the paths to suit your 
    installation!  And don''t forget to check you have the MIME::Lite perl 
    module and whatever other dependencies it requires.</SPAN><o:p></o:p></P>
    <P class=MsoNormal> <o:p></o:p></P>
    <P class=MsoNormal><SPAN 
    style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Tahoma','sans-serif'">HTH,</SPAN><o:p></o:p></P>
    <P class=MsoNormal><SPAN 
    style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Tahoma','sans-serif'">Andy.<o:p></o:p></SPAN></P>
    <DIV>
    <P class=MsoNormal> <o:p></o:p></P></DIV>
    <P class=MsoNormal><o:p> </o:p></P>
    <DIV class=MsoNormal style="TEXT-ALIGN: center" align=center>
    <HR align=center width="100%" SIZE=2>
    </DIV>
    <P class=MsoNormal style="MARGIN-BOTTOM: 12pt"><B><SPAN 
    style="FONT-SIZE: 10pt; FONT-FAMILY: 'Tahoma','sans-serif'">From:</SPAN></B><SPAN 
    style="FONT-SIZE: 10pt; FONT-FAMILY: 'Tahoma','sans-serif'"> Ryan Jay B. 
    Lapuz [mailto:rlapuz@fcpp.fujitsu.com] <BR><B>Sent:</B> Friday, 23 May 2008 
    3:15 p.m.<BR><B>To:</B> hobbit@hswn.dk<BR><B>Subject:</B> Re: [hobbit] alert 
    question</SPAN><o:p></o:p></P>
    <DIV>
    <P class=MsoNormal><SPAN 
    style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">Thanks for the 
    quick reply!</SPAN><o:p></o:p></P></DIV>
    <DIV>
    <P class=MsoNormal> <o:p></o:p></P></DIV>
    <DIV>
    <P class=MsoNormal><SPAN 
    style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">Make a custom 
    script; can someone share me the their script and teach me how to configure 
    it?</SPAN><o:p></o:p></P></DIV>
    <DIV>
    <P class=MsoNormal> <o:p></o:p></P></DIV>
    <DIV>
    <P class=MsoNormal><SPAN 
    style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">Thanks in 
    advance!</SPAN><o:p></o:p></P></DIV>
    <DIV>
    <P class=MsoNormal> <o:p></o:p></P></DIV>
    <DIV>
    <P class=MsoNormal><SPAN 
    style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">Regards.</SPAN><o:p></o:p></P></DIV>
    <DIV>
    <P class=MsoNormal><SPAN 
    style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">Ryan</SPAN><o:p></o:p></P></DIV>
    <BLOCKQUOTE 
    style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 4pt; PADDING-BOTTOM: 0in; MARGIN: 5pt 0in 5pt 3.75pt; BORDER-LEFT: black 1.5pt solid; PADDING-TOP: 0in; BORDER-BOTTOM: medium none">
      <DIV>
      <P class=MsoNormal><SPAN 
      style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">----- Original 
      Message ----- <o:p></o:p></SPAN></P></DIV>
      <DIV>
      <P class=MsoNormal style="BACKGROUND: #e4e4e4"><B><SPAN 
      style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">From:</SPAN></B><SPAN 
      style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"> <A 
      title=josh@imaginenetworksllc.com 
      href="mailto:josh@imaginenetworksllc.com">Josh Luthman</A> 
      <o:p></o:p></SPAN></P></DIV>
      <DIV>
      <P class=MsoNormal><B><SPAN 
      style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">To:</SPAN></B><SPAN 
      style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"> <A 
      title=hobbit@hswn.dk href="mailto:hobbit@hswn.dk">hobbit@hswn.dk</A> 
      <o:p></o:p></SPAN></P></DIV>
      <DIV>
      <P class=MsoNormal><B><SPAN 
      style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">Sent:</SPAN></B><SPAN 
      style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"> Friday, May 
      23, 2008 11:01 AM<o:p></o:p></SPAN></P></DIV>
      <DIV>
      <P class=MsoNormal><B><SPAN 
      style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'">Subject:</SPAN></B><SPAN 
      style="FONT-SIZE: 10pt; FONT-FAMILY: 'Arial','sans-serif'"> Re: [hobbit] 
      alert question<o:p></o:p></SPAN></P></DIV>
      <DIV>
      <P class=MsoNormal><o:p> </o:p></P></DIV>
      <P class=MsoNormal style="MARGIN-BOTTOM: 12pt">Pretty sure you'll have to 
      create a custom script and put in the HTML code in the data section of 
      your email.  To my knowledge you can't simply stick in text in the 
      alert Hobbit sends.<o:p></o:p></P>
      <DIV>
      <P class=MsoNormal>On Thu, May 22, 2008 at 10:57 PM, Ryan Jay B. Lapuz 
      <<A 
      href="mailto:rlapuz@fcpp.fujitsu.com">rlapuz@fcpp.fujitsu.com</A>> 
      wrote:<o:p></o:p></P>
      <DIV>
      <DIV>
      <P class=MsoNormal><SPAN 
      style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'">Hi 
      all!</SPAN><o:p></o:p></P></DIV>
      <DIV>
      <P class=MsoNormal> <o:p></o:p></P></DIV>
      <DIV>
      <P class=MsoNormal><SPAN 
      style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'">Just 
      a follow up newbie question.</SPAN><o:p></o:p></P></DIV>
      <DIV>
      <P class=MsoNormal> <o:p></o:p></P></DIV>
      <DIV>
      <P class=MsoNormal><SPAN 
      style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'">How 
      can I make hobbit to send me alerts with icon like that alert 
      below?</SPAN><o:p></o:p></P></DIV>
      <DIV>
      <P class=MsoNormal><SPAN 
      style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'">I 
      am receiving alerts like this:</SPAN><o:p></o:p></P></DIV>
      <DIV>
      <P class=MsoNormal> <o:p></o:p></P></DIV>
      <DIV>
      <P class=MsoNormal><SPAN style="COLOR: black">&yellow Warnings in 
      <a 
      href="/hobbit-cgi/bb-hostsvc.sh?CLIENT=HOST&amp;SECTION=msgs:/var/adm/messages">/var/adm/messages</a></SPAN><o:p></o:p></P></DIV>
      <DIV>
      <P class=MsoNormal><B><SPAN 
      style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Arial','sans-serif'">Hobbit 
      4.2.0 w/ all-in-one patch instaled in Fedora Core 
      6</SPAN></B><o:p></o:p></P></DIV>
      <DIV>
      <P class=MsoNormal style="MARGIN-BOTTOM: 12pt"><o:p> </o:p></P></DIV>
      <DIV>
      <DIV class=MsoNormal style="TEXT-ALIGN: center" align=center>
      <HR align=center width="100%" SIZE=2>
      </DIV></DIV>
      <DIV>
      <P class=MsoNormal style="MARGIN-BOTTOM: 12pt"><o:p> </o:p></P></DIV>
      <BLOCKQUOTE 
      style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0in; BORDER-TOP: medium none; PADDING-LEFT: 4pt; PADDING-BOTTOM: 0in; MARGIN: 5pt 0in 5pt 3.75pt; BORDER-LEFT: black 1.5pt solid; PADDING-TOP: 0in; BORDER-BOTTOM: medium none">
        <DIV><PRE><SPAN style="COLOR: black"> </SPAN><o:p></o:p></PRE><PRE><SPAN style="COLOR: black">   <IMG id=_x0000_i1027 height=16 alt=green src="cid:834554110@29052008-13A0" width=16 border=0> Listener LISTENER_RMAN1 UP</SPAN><o:p></o:p></PRE><PRE><SPAN style="COLOR: black">   <IMG id=_x0000_i1028 height=16 alt=red src="cid:834554110@29052008-13A7" width=16 border=0> Listener LISTENER DOWN</SPAN><o:p></o:p></PRE><PRE><SPAN style="COLOR: black"> </SPAN><o:p></o:p></PRE><PRE><SPAN style="COLOR: black">   <IMG id=_x0000_i1029 height=16 alt=red src="cid:834554110@29052008-13A7" width=16 border=0> Listener LISTENER DOWN</SPAN><o:p></o:p></PRE>
        <P> </P></DIV></BLOCKQUOTE></DIV></DIV></BLOCKQUOTE></BLOCKQUOTE></DIV></BLOCKQUOTE>
<P>#####################################################################################</P>
<P>This email is intended for the person to whom it is addressed<BR>only. If you 
are not the intended recipient, do not read, copy<BR>or use the contents in any 
way. The opinions expressed may not<BR>necessarily reflect those of ZESPRI Group 
of Companies ('ZESPRI').</P>
<P>While every effort has been made to verify the information<BR>contained 
herein, ZESPRI does not make any representations <BR>as to the accuracy of the 
information or to the performance<BR>of any data, information or the products 
mentioned herein.<BR>ZESPRI will not accept liability for any losses, damage 
or<BR>consequence, however, resulting directly or indirectly from<BR>the use of 
this 
e-mail/attachments.<BR>#####################################################################################</P>
</BODY></HTML>