<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16587" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV dir=ltr align=left><SPAN class=601552303-23052008><FONT face=Tahoma 
color=#0000ff size=2>Hi Ryan,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=601552303-23052008><FONT face=Tahoma 
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=601552303-23052008><FONT face=Tahoma 
color=#0000ff size=2>Here's what I use, in three parts:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=601552303-23052008><FONT face=Tahoma 
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=601552303-23052008><FONT face=Tahoma 
color=#0000ff size=2><STRONG>FIRST:</STRONG>  The mail script 
/opt/hobbit/bin/htmlmail</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <DIV dir=ltr align=left><SPAN class=601552303-23052008><FONT 
  face="Courier New" color=#0000ff size=2>#!/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</FONT></SPAN></DIV>
  <DIV><FONT face="Courier New" color=#0000ff size=2></FONT> </DIV>
  <DIV dir=ltr align=left><SPAN class=601552303-23052008><FONT 
  face="Courier New" color=#0000ff size=2>#<BR># Minumum hobbit-alerts.cfg entry 
  -<BR># SCRIPT /opt/hobbit/bin/htmlmail support 
  FORMAT=PLAIN<BR>#</FONT></SPAN></DIV>
  <DIV><FONT face="Courier New" color=#0000ff size=2></FONT> </DIV>
  <DIV dir=ltr align=left><SPAN class=601552303-23052008><FONT 
  face="Courier New" color=#0000ff size=2>if [ ${RECOVERED} = 1 
  ]<BR>then<BR>        export 
  BBCOLORLEVEL="RECOVERED"<BR>        export 
  BBCOLOR="green"<BR>else<BR>        export 
  BBCOLOR=$BBCOLORLEVEL<BR>fi</FONT></SPAN></DIV>
  <DIV><FONT face="Courier New" color=#0000ff size=2></FONT> </DIV>
  <DIV dir=ltr align=left><SPAN class=601552303-23052008><FONT 
  face="Courier New" color=#0000ff size=2># Convert plain line breaks to HTML 
  breaks</FONT></SPAN></DIV>
  <DIV><FONT face="Courier New" color=#0000ff size=2></FONT> </DIV>
  <DIV dir=ltr align=left><SPAN class=601552303-23052008><FONT 
  face="Courier New" color=#0000ff size=2># export BBALPHAMSG="`echo 
  \"$BBALPHAMSG\" | sed '/>$/!s/$/<BR>/'`"</FONT></SPAN></DIV>
  <DIV><FONT face="Courier New" color=#0000ff size=2></FONT> </DIV>
  <DIV dir=ltr align=left><SPAN class=601552303-23052008><FONT 
  face="Courier New" color=#0000ff size=2># Convert Hobbit colour tags to 
  embedded image tags</FONT></SPAN></DIV>
  <DIV><FONT face="Courier New" color=#0000ff size=2></FONT> </DIV>
  <DIV dir=ltr align=left><SPAN class=601552303-23052008><FONT 
  face="Courier New" color=#0000ff size=2>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'`"</FONT></SPAN></DIV>
  <DIV><FONT face="Courier New" color=#0000ff size=2></FONT> </DIV>
  <DIV dir=ltr align=left><SPAN class=601552303-23052008><FONT 
  face="Courier New" color=#0000ff size=2># Fix link at base of message as they 
  are removed in PLAIN format</FONT></SPAN></DIV>
  <DIV><FONT face="Courier New" color=#0000ff size=2></FONT> </DIV>
  <DIV dir=ltr align=left><SPAN class=601552303-23052008><FONT 
  face="Courier New" color=#0000ff size=2>export BBALPHAMSG="`echo 
  \"$BBALPHAMSG\" | sed 's|http:.*|<a 
  href="&">&</a>|g'`"</FONT></SPAN></DIV>
  <DIV><FONT face="Courier New" color=#0000ff size=2></FONT> </DIV>
  <DIV dir=ltr align=left><SPAN class=601552303-23052008><FONT 
  face="Courier New" color=#0000ff size=2># Run Perl script to generate 
  email</FONT></SPAN></DIV>
  <DIV dir=ltr align=left><SPAN class=601552303-23052008><FONT 
  face="Courier New" color=#0000ff size=2></FONT></SPAN> </DIV>
  <DIV dir=ltr align=left><SPAN class=601552303-23052008><FONT color=#0000ff 
  size=2><FONT face="Courier New">/opt/hobbit/bin/htmlmail.pl > /dev/null 
  2>&1</FONT></DIV></FONT></SPAN></BLOCKQUOTE>
<DIV dir=ltr align=left><SPAN class=601552303-23052008><FONT face=Tahoma 
color=#0000ff size=2><STRONG>SECOND:</STRONG>  The perl script to format 
and send the message /opt/hobbit/bin/htmlmail.pl</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <DIV dir=ltr align=left><SPAN class=601552303-23052008><FONT 
  face="Courier New" color=#0000ff size=2>#!/opt/csw/bin/perl 
  -w</FONT></SPAN></DIV>
  <DIV><FONT face="Courier New"></FONT> </DIV>
  <DIV dir=ltr align=left><SPAN class=601552303-23052008><FONT 
  face="Courier New" color=#0000ff size=2>use strict;<BR>use 
  MIME::Lite;</FONT></SPAN></DIV>
  <DIV><FONT face="Courier New"></FONT> </DIV>
  <DIV dir=ltr align=left><SPAN class=601552303-23052008><FONT 
  face="Courier New" color=#0000ff size=2>my $rcpt = $ENV{'RCPT'};<BR>my 
  $bbhostsvc = $ENV{'BBHOSTSVC'};<BR>my $bbcolorlevel = 
  $ENV{'BBCOLORLEVEL'};<BR>my $bbalphamsg = 
  $ENV{'BBALPHAMSG'};</FONT></SPAN></DIV>
  <DIV><FONT face="Courier New"></FONT> </DIV>
  <DIV dir=ltr align=left><SPAN class=601552303-23052008><FONT 
  face="Courier New" color=#0000ff size=2>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>);</FONT></SPAN></DIV>
  <DIV><FONT face="Courier New"></FONT> </DIV>
  <DIV dir=ltr align=left><SPAN class=601552303-23052008><FONT 
  face="Courier New" color=#0000ff size=2>my $msg = 
  MIME::Lite->new<BR>(<BR>        Subject 
  => $subject,<BR>        
  To      => 
  $rcpt,<BR>        Type    
  => 'multipart/related'<BR>);</FONT></SPAN></DIV>
  <DIV><FONT face="Courier New"></FONT> </DIV>
  <DIV dir=ltr align=left><SPAN class=601552303-23052008><FONT 
  face="Courier New" color=#0000ff 
  size=2>$msg->attach<BR>(<BR>        
  Type    => 
  'text/html',<BR>        
  Data    => $htmldata,<BR>);</FONT></SPAN></DIV>
  <DIV><FONT face="Courier New"></FONT> </DIV>
  <DIV dir=ltr align=left><SPAN class=601552303-23052008><FONT 
  face="Courier New" color=#0000ff size=2>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')}</FONT></SPAN></DIV>
  <DIV><FONT face="Courier New"></FONT> </DIV>
  <DIV dir=ltr align=left><SPAN class=601552303-23052008><FONT 
  face="Courier New" color=#0000ff 
size=2>$msg->send();</FONT></SPAN></DIV></BLOCKQUOTE>
<DIV dir=ltr align=left><SPAN class=601552303-23052008><FONT face=Tahoma 
color=#0000ff size=2><STRONG>THIRD:</STRONG>  Configure your 
hobbit-alerts.cfg lines like this:</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <DIV dir=ltr align=left><SPAN class=601552303-23052008><FONT color=#0000ff 
  size=2><FONT face="Courier New">SCRIPT /opt/hobbit/bin/htmlmail <A 
  href="mailto:Someone@nowhere.com">Someone@nowhere.com</A></FONT><FONT 
  face="Courier New"> FORMAT=TEXT</FONT></FONT></SPAN></DIV></BLOCKQUOTE>
<DIV dir=ltr align=left><SPAN class=601552303-23052008><FONT face=Tahoma 
color=#0000ff size=2>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.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=601552303-23052008><FONT face=Tahoma 
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=601552303-23052008><FONT face=Tahoma 
color=#0000ff size=2>HTH,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=601552303-23052008><FONT face=Tahoma 
color=#0000ff size=2>Andy.</DIV>
<DIV dir=ltr style="MARGIN-RIGHT: 0px"></FONT></SPAN> </DIV><FONT 
face=Tahoma color=#0000ff size=2></FONT><FONT face=Tahoma color=#0000ff 
size=2></FONT><FONT face="Courier New" color=#0000ff size=2></FONT><FONT 
face="Courier New" color=#0000ff size=2></FONT><FONT face=Tahoma color=#0000ff 
size=2></FONT><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> Friday, 23 May 2008 3:15 
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>Thanks for the quick reply!</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Make a custom script; can someone share me the 
their script and teach me how to configure it?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks in advance!</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Regards.</FONT></DIV>
<DIV><FONT face=Arial size=2>Ryan</FONT></DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=josh@imaginenetworksllc.com 
  href="mailto:josh@imaginenetworksllc.com">Josh Luthman</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> Friday, May 23, 2008 11:01 AM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [hobbit] alert 
question</DIV>
  <DIV><BR></DIV>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.<BR><BR>
  <DIV class=gmail_quote>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:<BR>
  <BLOCKQUOTE class=gmail_quote 
  style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
    <DIV lang=EN-US vlink="black" link="blue" bgcolor="#ffffff"><PRE><FONT color=black><SPAN style="COLOR: black"></SPAN></FONT></PRE>
    <DIV><FONT face="Courier New" color=black size=2><SPAN 
    style="FONT-SIZE: 10pt; COLOR: black">Hi all!</SPAN></FONT></DIV>
    <DIV><FONT face="Courier New" color=black size=2><SPAN 
    style="FONT-SIZE: 10pt; COLOR: black"></SPAN></FONT> </DIV>
    <DIV><FONT face="Courier New" color=black size=2><SPAN 
    style="FONT-SIZE: 10pt; COLOR: black"><FONT face=Arial>Just a follow up 
    newbie question.</FONT></SPAN></FONT></DIV>
    <DIV><FONT face="Courier New" color=black size=2><SPAN 
    style="FONT-SIZE: 10pt; COLOR: black"><FONT 
    face=Arial></FONT></SPAN></FONT> </DIV>
    <DIV><FONT face="Courier New" color=black size=2><SPAN 
    style="FONT-SIZE: 10pt; COLOR: black"><FONT face=Arial>How can I make hobbit 
    to send me alerts with icon like that alert 
below?</FONT></SPAN></FONT></DIV>
    <DIV><FONT face=Arial color=black size=2><SPAN 
    style="FONT-SIZE: 10pt; COLOR: black">I am receiving alerts like 
    this:</SPAN></FONT></DIV>
    <DIV><FONT face=Arial color=black size=2><SPAN 
    style="FONT-SIZE: 10pt; COLOR: black"></SPAN></FONT> </DIV>
    <DIV><FONT face=Arial color=black size=2><SPAN 
    style="FONT-SIZE: 10pt; COLOR: black"><FONT face="Times New Roman" 
    size=3>&yellow Warnings in <a 
    href="/hobbit-cgi/bb-hostsvc.sh?CLIENT=HOST&amp;SECTION=msgs:/var/adm/messages">/var/adm/messages</a><BR></FONT></SPAN></FONT></DIV>
    <DIV><FONT face="Courier New" color=black size=2><SPAN 
    style="FONT-SIZE: 10pt; COLOR: black"><FONT face=Arial><B>Hobbit 4.2.0 w/ 
    all-in-one patch instaled in Fedora Core 6</B></FONT></SPAN></FONT></DIV>
    <DIV><FONT face=Arial></FONT><FONT face=Arial></FONT><FONT 
    face=Arial></FONT><BR><BR></DIV>
    <DIV>
    <HR align=center width="100%" SIZE=2>
    </DIV>
    <DIV><BR><BR></DIV>
    <BLOCKQUOTE dir=ltr 
    style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(0,0,0) 2px solid; MARGIN-RIGHT: 0px">
      <DIV><PRE><FONT face="Courier New" color=black size=2><SPAN style="FONT-SIZE: 10pt; COLOR: black"> </SPAN></FONT></PRE><PRE><FONT face="Courier New" color=black size=2><SPAN style="FONT-SIZE: 10pt; COLOR: black">   <IMG height=16 alt=green src="cid:601552303@23052008-1543" width=16 border=0> Listener LISTENER_RMAN1 UP</SPAN></FONT></PRE><PRE><FONT face="Courier New" color=black size=2><SPAN style="FONT-SIZE: 10pt; COLOR: black">   <IMG height=16 alt=red src="cid:601552303@23052008-154A" width=16 border=0> Listener LISTENER DOWN</SPAN></FONT></PRE><PRE><FONT face="Courier New" color=black size=2><SPAN style="FONT-SIZE: 10pt; COLOR: black"> </SPAN></FONT></PRE><PRE><FONT face="Courier New" color=black size=2><SPAN style="FONT-SIZE: 10pt; COLOR: black">   <IMG height=16 alt=red src="cid:601552303@23052008-154A" width=16 border=0> Listener LISTENER DOWN</SPAN></FONT></PRE>
      <P><FONT face="Times New Roman" size=3><SPAN 
      style="FONT-SIZE: 12pt"></SPAN></FONT> </P>
      <P><FONT face=Tahoma color=#0000ff size=2><SPAN 
      style="FONT-SIZE: 10pt"></SPAN></FONT> </P></DIV></BLOCKQUOTE></DIV></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>