Informix

Informix

Connect with Db2, Informix, Netezza, open source, and other data experts to gain value from your data, share insights, and solve problems.

 View Only
  • 1.  How to configure alarmprogram.sh to trigger only on errors and replication failures?

    Posted 06/22/26 07:06 AM
    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
    ------------------------------


  • 2.  RE: How to configure alarmprogram.sh to trigger only on errors and replication failures?

    Posted 06/22/26 07:36 AM

    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
    ------------------------------



  • 3.  RE: How to configure alarmprogram.sh to trigger only on errors and replication failures?

    Posted 06/22/26 08:05 AM

    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  





  • 4.  RE: How to configure alarmprogram.sh to trigger only on errors and replication failures?
    Best Answer

    Posted 06/22/26 08:11 AM

    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
    ------------------------------



  • 5.  RE: How to configure alarmprogram.sh to trigger only on errors and replication failures?

    Posted 06/23/26 01:50 AM

    Thanks



    ------------------------------
    Samuel To
    ------------------------------