need program to send an alarm to my pager
Posted in 1999
Topics: General Discussion
Hi to all of you!! I'm workig with Informix DS 7.23 on an IBM RS/6000 SP (AIX 4.2.1.0). I'm using the oncockpit utility from Informix and it has been working fine. I would like to know if any of you know a program or a shell script that could send an alarm message to my beeper.
Horacio,
I tinkered with the log_full.sh script that comes with Informix to try to
accomplish this very thing. You'll need an alpha pager to make this work.
This is what I have so far.
PROG=`basename $0`
USER_LIST=informix
EXIT_STATUS=0
DBA_ADDRESS="[my pager's e-mail address]"
INFORMIXDIR=[the appropriate INFORMIXDIR path]
EVENT_SEVERITY=$1
EVENT_CLASS=$2
EVENT_MSG="$3"
EVENT_ADD_TEXT="$4"
EVENT_FILE="$5"
case "$EVENT_SEVERITY" in
3 | 4 | 5)
cat "Severity: $1" "Class: $2" $3 $4 $5 >
$INFORMIXDIR/etc/alertdba.msg
mailx -s "DBA ALERT ON [servername]" $DBA_ADDRESS <
$INFORMIXDIR/etc/alertdba.msg
;;
*)
# EXIT_STATUS=1
;;
esac
EXIT_STATUS=$?
exit $EXIT_STATUS
I've called the above script alertdba.sh. If you implement something like
this, make sure that the ALARMPROG parameter in your onconfig file points to
this script.
You'll probably recognize some of the structure of log_full.sh in here. All
I did was add my pager's e-mail address, and change the central CASE
statement to send me anything of severity 3, 4 or 5.
I should mention that I haven't gotten this program to work perfectly yet.
It has gone off only once, and I did get a page with the appropriate
subject, but the body of the message, (which should have told me what the
problem was), didn't come through. Even though it didn't tell me what the
problem was, it told me THAT there was a problem, and I came back and fixed
it.
If anyone knows why I didn't get the body of the message in my e-mail page,
I'd welcome any de-bugging advice. Thanks.
Hope this helps,
Kind regards,
John Bejarano
Horacio wrote in message ...
>Hi to all of you!!
>
>I'm workig with Informix DS 7.23 on an IBM RS/6000 SP (AIX 4.2.1.0).
>
> I'm using the oncockpit utility from Informix and it has been working
>fine. I would like to know if any of you know a program or a shell script
>that could send an alarm message to my beeper.
>
>
>
>
Horacio wrote: > > Hi to all of you!! > > I´m workig with Informix DS 7.23 on an IBM RS/6000 SP (AIX 4.2.1.0). > > I´m using the oncockpit utility from Informix and it has been working > fine. I would like to know if any of you know a program or a shell script > that could send an alarm message to my beeper. My eventalarm.c ALARMPROGRAM handler does this already all you need is a text pager and have your paging company enable it to receive email. Then add the pager's email address to the eventalarm.cfg file's list of email accounts. Eventalarm.c is part of my package utils3_ak in the IIUG Software Repository. Art S. Kagel
Anything concerning dialup requirements? I don't have a constant connection to the Internet, just a dialup. TIA John Carlson Informix DBA WHSmith USA Horacio wrote: > > Hi to all of you!! > > I´m workig with Informix DS 7.23 on an IBM RS/6000 SP (AIX 4.2.1.0). > > I´m using the oncockpit utility from Informix and it has been working > fine. I would like to know if any of you know a program or a shell script > that could send an alarm message to my beeper.