Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Sh To wanted alarmprogram.sh to alert only on failures such as backup errors or lost RSS/HDR connections. ke chen and khaled Bentebal advised editing the script per event and severity, with severity 5 serious; ke chen also suggested Informix HQ. Boycho Velkov said setting ALARMADMIN=3 sends mail for severity 3, 4 and 5. Sh To thanked them.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
Sh To — source: IBM Community (ConnectedCommunity.org) Informix forum
Hello,
We would like to tune our
alarmprogram.sh
script to receive alerts only when something goes wrong.
After our initial configuration, we noticed that we receive alerts for successful events, such as when a backup or a logical log backup succeeds. We actually want the opposite: we only want to be alerted when a backup fails, or when the connection between the primary server and a secondary server (RSS or HDR) drops.
How should we configure the script to achieve this?
Right now, this is what we have:
ALARMADMIN=1
ALARMPAGER=0
ADMINEMAIL=
admin@srv.net
PAGEREMAIL=
MAILUTILITY=/usr/bin/mail
# ########################################
#
#
PRIVATE SECTION : EVENT HANDLERS
#
# ########################################
ALRM_NOTWORTHY=1
ALRM_INFO=2
ALRM_ATTENTION=3
ALRM_EMERGENCY=4
ALRM_FATAL=5
EVENT_SEVERITY=$1
EVENT_CLASS=$2
EVENT_MSG="$3"
EVENT_ADD_TEXT="$4"
EVENT_FILE="$5"
EVENT_UNIQID="$6"
BACKUP_CMD="ontape -a -d"
RM="rm -f"
ONSTATCMD="onstat"
MAILBODY=/tmp/__MAILBODY_$$
MAILHEAD=/tmp/__MAILHEAD_$$
TMPFILE=/tmp/__TMPFILE_$$
TMPFILE1=/tmp/__TMPFILE1_$$
ALARMTESTFILE=
Thank you for your help!
------------------------------
Samuel To
------------------------------
↪ replying to Sh To
ke chen — source: IBM Community (ConnectedCommunity.org) Informix forum
You probably need to look at standard template of alarmprogram.sh, and add actions to each of your desired events ( event id is different for various alerts/ errors).
The easiest way is to use informix HQ to monitor the database. It is under $INFORMIXDIR/hq, you can copy this directory to other location, then start hq service and configure it on web browser. I think HQ is free. It is contained in most of recent packages even in developer edition.
------------------------------
ke chen
------------------------------
↪ replying to Sh To
khaled Bentebal — source: IBM Community (ConnectedCommunity.org) Informix forum
Hello,
The alarmprogram.sh is just a shell script. You need to look into it and tailor it to your needs. This script was meant to help you to have a basic example. You could enrich it the way you want by either adding things or adapting things to alter the way you want. It is up to you to check the SEVERITY level that you want and act accordingly. SEVERITY levels 1 and 2 could be taken out since they are just for information purposes. You should adapt your script differently for SEVERITY LEVEL 3, 4 and 5.
Check:
https://www.ibm.com/docs/en/informix-servers/14.10.0?topic=alarms-event-alarm-parameters
SEVERITY 5 should be taken seriously:
https://www.ibm.com/docs/en/informix-servers/14.10.0?topic=ids-severity-5-event-alarms
-- Cordialement, Regards, Khaled Bentebal Email:
khaled.bentebal@consult-ix.fr
↪ replying to Sh To
Boycho Velkov — source: IBM Community (ConnectedCommunity.org) Informix forum
Hi,
Just change the value of ALARMADMIN from ALARMADMIN=1 to ALARMADMIN=3. You will receive mails for: 3 (Warning), 4 (Critical) and 5 (Fatal).
Test it.
Later you can change(if you want) to ALARMADMIN=4.
I haven't used it, but that's the logic in alarmprogram.sh.
Regards,
------------------------------
Boycho Velkov
------------------------------
↪ replying to Boycho Velkov
Sh To — source: IBM Community (ConnectedCommunity.org) Informix forum
Thanks
------------------------------
Samuel To
------------------------------
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.