alarmprogram.sh
Posted in 2011
Topics: General Discussion
hello does alarmprogram.sh allow multiple ADMINEMAIL and PAGEREMAIL entries? - (just separated by a comma?) thanks
On Wed, Jun 29, 2011 at 07:07, Tom Lehr <tomcaml@gmail.com> wrote: > 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@gmail.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."