dbTalk Databases Forums  

alarmprogram.sh

comp.databases.informix comp.databases.informix


Discuss alarmprogram.sh in the comp.databases.informix forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Tom Lehr
 
Posts: n/a

Default alarmprogram.sh - 06-29-2011 , 09:07 AM






hello

does alarmprogram.sh allow multiple ADMINEMAIL and PAGEREMAIL entries?
- (just separated by a comma?)

thanks

Reply With Quote
  #2  
Old   
Jonathan Leffler
 
Posts: n/a

Default Re: alarmprogram.sh - 06-29-2011 , 09:32 AM






On Wed, Jun 29, 2011 at 07:07, Tom Lehr <tomcaml (AT) gmail (DOT) com> wrote:

Quote:
does alarmprogram.sh allow multiple ADMINEMAIL and PAGEREMAIL entries?
- (just separated by a comma?)

Yes.

One paragraph of relevant code (from the script) is:


if ( `test $ALARMPAGER -ne 0` ) then
if ( `test $EVENT_SEVERITY -ge $ALARMPAGER`) then
if ( `test x"$PAGEREMAIL" != x""` ) then
if ( `test ${NOSENDER} -eq 0` ) then
printf "cc: %s\n" $PAGEREMAIL >> $MAILHEAD
MAILTO=$MAILTO,$PAGEREMAIL
else
printf "To: %s\n" $PAGEREMAIL >> $MAILHEAD
MAILTO=$PAGEREMAIL
fi
fi
else
echo "Event Severity = $EVENT_SEVERITY is lower than
ALARMPAGER=$ALARMPAGER"
echo "No mail will be sent to PAGEREMAIL"
fi
fi

You can see that the script builds up a list of email recipients with
commas. Note that it will probably not be happy with spaces anywhere in the
list. (No, I didn't write the script - someone who writes C shell code
did!).

--
Jonathan Leffler <jonathan.leffler (AT) gmail (DOT) com> #include <disclaimer.h>
Guardian of DBD::Informix - v2011.0612 - http://dbi.perl.org
"Blessed are we who can laugh at ourselves, for we shall never cease to be
amused."

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.