<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=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<!--[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 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;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
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
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
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 bgcolor=white lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>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:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>=G=<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
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"'>From:</span></b><span
style='font-size:10.0pt;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> hobbit@hswn.dk<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:10.0pt;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:10.0pt;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:10.0pt;font-family:"Arial","sans-serif"'>error:</span></strong><b><span
style='font-size:10.0pt;font-family:"Arial","sans-serif"'><br>
</span></b><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:red'>./htmlmail: line 30: [: =: unary operator expected</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal><span style='font-size:10.0pt;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:10.0pt;font-family:"Arial","sans-serif"'> <o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:red'># Convert plain line breaks to HTML breaks</span><span
style='font-size:10.0pt;font-family:"Arial","sans-serif"'><o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'> <o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:red'># export BBALPHAMSG="`echo \"$BBALPHAMSG\" | sed
'/>$/!s/$/<BR>/'`"</span><span style='font-size:10.0pt;
font-family:"Arial","sans-serif"'><o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'> <o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:red'># Convert Hobbit colour tags to embedded image tags</span><span
style='font-size:10.0pt;font-family:"Arial","sans-serif"'><o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'> <o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:red'>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:10.0pt;font-family:"Arial","sans-serif"'><o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'> <o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:red'># Fix link at base of message as they are removed in PLAIN format</span><span
style='font-size:10.0pt;font-family:"Arial","sans-serif"'><o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'> <o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:red'>export BBALPHAMSG="`echo \"$BBALPHAMSG\" | sed
's|http:.*|<a href="&">&</a>|g'`"</span><span
style='font-size:10.0pt;font-family:"Arial","sans-serif"'><o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'> <o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:red'># Run Perl script to generate email</span><span style='font-size:
10.0pt;font-family:"Arial","sans-serif"'><o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'> <o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:red'>/home/hobbit/server/bin/htmlmail.pl > /dev/null 2>&1</span><span
style='font-size:10.0pt;font-family:"Arial","sans-serif"'><o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'> <o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal><strong><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>/var/log/hobbit/page.log:</span></strong><span
style='font-size:10.0pt;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:10.0pt;font-family:"Arial","sans-serif"'> <o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal><span style='font-size:10.0pt;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:10.0pt;font-family:"Arial","sans-serif"'> <o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Thanks
in advance!<o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'> <o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Regards,<o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Ryan</span><o:p></o:p></p>

</div>

<blockquote style='border:none;border-left:solid black 1.5pt;padding:0in 0in 0in 4.0pt;
margin-left:3.75pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt'>

<div>

<p class=MsoNormal><span style='font-size:10.0pt;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:10.0pt;
font-family:"Arial","sans-serif"'>From:</span></b><span style='font-size:10.0pt;
font-family:"Arial","sans-serif"'> <a href="mailto:Andy@zespri.com"
title="Andy@zespri.com">Andy France</a> <o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>To:</span></b><span
style='font-size:10.0pt;font-family:"Arial","sans-serif"'> <a
href="mailto:hobbit@hswn.dk" title="hobbit@hswn.dk">hobbit@hswn.dk</a> <o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Sent:</span></b><span
style='font-size:10.0pt;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:10.0pt;font-family:"Arial","sans-serif"'>Subject:</span></b><span
style='font-size:10.0pt;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:10.0pt;font-family:"Tahoma","sans-serif";
color:blue'>Hi Ryan,</span><o:p></o:p></p>

<p class=MsoNormal> <o:p></o:p></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";
color:blue'>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:10.0pt;font-family:"Tahoma","sans-serif";
color:blue'>FIRST:</span></strong><span style='font-size:10.0pt;font-family:
"Tahoma","sans-serif";color:blue'>  The mail script
/opt/hobbit/bin/htmlmail</span><o:p></o:p></p>

<blockquote style='margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt'>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";
color:blue'>#!/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:10.0pt;font-family:"Courier New";
color:blue'>#<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:10.0pt;font-family:"Courier New";
color:blue'>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:10.0pt;font-family:"Courier New";
color:blue'># 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:10.0pt;font-family:"Courier New";
color:blue'># 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:10.0pt;font-family:"Courier New";
color:blue'># 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:10.0pt;font-family:"Courier New";
color:blue'>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:10.0pt;font-family:"Courier New";
color:blue'># 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:10.0pt;font-family:"Courier New";
color:blue'>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:10.0pt;font-family:"Courier New";
color:blue'># 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:10.0pt;font-family:"Courier New";
color:blue'>/opt/hobbit/bin/htmlmail.pl > /dev/null 2>&1</span><span
style='font-size:10.0pt;color:blue'><o:p></o:p></span></p>

</blockquote>

<p class=MsoNormal><strong><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";
color:blue'>SECOND:</span></strong><span style='font-size:10.0pt;font-family:
"Tahoma","sans-serif";color:blue'>  The perl script to format and send the
message /opt/hobbit/bin/htmlmail.pl</span><o:p></o:p></p>

<blockquote style='margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt'>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";
color:blue'>#!/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:10.0pt;font-family:"Courier New";
color:blue'>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:10.0pt;font-family:"Courier New";
color:blue'>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:10.0pt;font-family:"Courier New";
color:blue'>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:10.0pt;font-family:"Courier New";
color:blue'>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:10.0pt;font-family:"Courier New";
color:blue'>$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:10.0pt;font-family:"Courier New";
color:blue'>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:10.0pt;font-family:"Courier New";
color:blue'>$msg->send();</span><o:p></o:p></p>

</blockquote>

<p class=MsoNormal><strong><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";
color:blue'>THIRD:</span></strong><span style='font-size:10.0pt;font-family:
"Tahoma","sans-serif";color:blue'>  Configure your hobbit-alerts.cfg lines
like this:</span><o:p></o:p></p>

<blockquote style='margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt'>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";
color:blue'>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:10.0pt;font-family:"Tahoma","sans-serif";
color:blue'>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:10.0pt;font-family:"Tahoma","sans-serif";
color:blue'>HTH,</span><o:p></o:p></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";
color:blue'>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 align=center style='text-align:center'>

<hr size=2 width="100%" align=center>

</div>

<p class=MsoNormal style='margin-bottom:12.0pt'><b><span style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;
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:10.0pt;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:10.0pt;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:10.0pt;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:10.0pt;font-family:"Arial","sans-serif"'>Regards.</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Ryan</span><o:p></o:p></p>

</div>

<blockquote style='border:none;border-left:solid black 1.5pt;padding:0in 0in 0in 4.0pt;
margin-left:3.75pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt'>

<div>

<p class=MsoNormal><span style='font-size:10.0pt;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:10.0pt;
font-family:"Arial","sans-serif"'>From:</span></b><span style='font-size:10.0pt;
font-family:"Arial","sans-serif"'> <a href="mailto:josh@imaginenetworksllc.com"
title="josh@imaginenetworksllc.com">Josh Luthman</a> <o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>To:</span></b><span
style='font-size:10.0pt;font-family:"Arial","sans-serif"'> <a
href="mailto:hobbit@hswn.dk" title="hobbit@hswn.dk">hobbit@hswn.dk</a> <o:p></o:p></span></p>

</div>

<div>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Sent:</span></b><span
style='font-size:10.0pt;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:10.0pt;font-family:"Arial","sans-serif"'>Subject:</span></b><span
style='font-size:10.0pt;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:12.0pt'>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:10.0pt;font-family:"Courier New";
color:black'>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:10.0pt;font-family:"Arial","sans-serif";
color:black'>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:10.0pt;font-family:"Arial","sans-serif";
color:black'>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:10.0pt;font-family:"Arial","sans-serif";
color:black'>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:10.0pt;font-family:"Arial","sans-serif";
color:black'>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:12.0pt'><o:p> </o:p></p>

</div>

<div>

<div class=MsoNormal align=center style='text-align:center'>

<hr size=2 width="100%" align=center>

</div>

</div>

<div>

<p class=MsoNormal style='margin-bottom:12.0pt'><o:p> </o:p></p>

</div>

<blockquote style='border:none;border-left:solid black 1.5pt;padding:0in 0in 0in 4.0pt;
margin-left:3.75pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt'>

<div><pre><span style='color:black'> </span><o:p></o:p></pre><pre><span
style='color:black'>   <img border=0 width=16 height=16
id="_x0000_i1027" src="cid:image001.gif@01C8BD88.64EC2A60" alt=green> Listener LISTENER_RMAN1 UP</span><o:p></o:p></pre><pre><span
style='color:black'>   <img border=0 width=16 height=16
id="_x0000_i1028" src="cid:image002.gif@01C8BD88.64EC2A60" alt=red> 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
border=0 width=16 height=16 id="_x0000_i1029"
src="cid:image002.gif@01C8BD88.64EC2A60" alt=red> Listener LISTENER DOWN</span><o:p></o:p></pre>

<p> <o:p></o:p></p>

<p> <o:p></o:p></p>

</div>

</blockquote>

</div>

</div>

</blockquote>

<p>#####################################################################################<o:p></o: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').<o:p></o:p></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>
#####################################################################################<o:p></o:p></p>

</blockquote>

</div>

</body>

</html>