Forum Discussion

Pooja_s_123_330's avatar
Pooja_s_123_330
Icon for Nimbostratus rankNimbostratus
Aug 23, 2017
Solved

Email alerts for specific node

Hello,

 

I am trying to have the email alerts when a node/pool goes down. I configured the /config/user_alerts.conf file to send the email but i get notification for every node/pool. What shall i do to have alerts for specific alerts

 

Regards Pooja

 

  • Hi Pooja,

    I have similar problem and posted a question about it. I tried several solutions, and to call a script from user_alert.conf but it fails.

    Can you make a try by adding, to the /config/user_alert.conf, a new stanza like that:

    alert BIGIP_TEST "IP monitor status down" { 
        snmptrap OID=".1.3.6.1.4.1.3375.2.4.0.12"; 
        email toaddress="email address" 
        fromaddress="donotreply@statoil.com" 
        body="Service DOWN" 
    }
    

    ?

    As for the "IP" in the first row specify the ip address for one specific node.

    Regards,

    Preslav

8 Replies

  • Hello Pooja,

     

    Can you share your config for /config/user_alert.conf?

     

    Regards,

     

    Preslav

     

  • Hi Preslav,

     

    Yes,

     

    alert BIGIP_TEST "pool_test has become available" { snmptrap OID=".1.3.6.1.4.1.3375.2.4.0.400"; email toaddress="email address" fromaddress="donotreply@statoil.com" body="Service UP" } alert BIGIP_TEST "pool_test has become unavailable" { snmptrap OID=".1.3.6.1.4.1.3375.2.4.0.401"; email toaddress=""email address" fromaddress="donotreply@statoil.com" body="Service Down" }

     

    I am not sure if the OIDS are ok.

     

    regards Pooja

     

  • Hi Pooja,

    I have similar problem and posted a question about it. I tried several solutions, and to call a script from user_alert.conf but it fails.

    Can you make a try by adding, to the /config/user_alert.conf, a new stanza like that:

    alert BIGIP_TEST "IP monitor status down" { 
        snmptrap OID=".1.3.6.1.4.1.3375.2.4.0.12"; 
        email toaddress="email address" 
        fromaddress="donotreply@statoil.com" 
        body="Service DOWN" 
    }
    

    ?

    As for the "IP" in the first row specify the ip address for one specific node.

    Regards,

    Preslav

  • Your "matched message" has to be more specific. Your snmp oid value is unique, dont think its used anywhere in the configs. But when you say, your are seeing mail alerts triggered for multiple pools (pool_a pool_b pool_c pool_test etc etc) status changes ? But whereas you have configured just pool_test in your alert.conf file ?

     

  • You can user regular expresion;

     

    alert 1 "pool_name member (.?) monitor status (.?)"

     

    Replace name for your pool name. You will receive alarmw when a member goes down and when is up again. If you want only down alerts, the expression is:

     

    alert 1 "pool_name member *(.?) monitor status down"

     

    You can test the configuration is OK with logger, this will write an entry in the log an trigger the email:

     

    logger -p local0.notice "TEST EMAILS !! May 17 00:10:08 lbgccpro1 notice mcpd[7094]: 01070727:5: Pool /Common/pool_*name* member /Common/23.8.34.13:8096 monitor status up. [ /Common/monitor: up ] [ was down for 0hr:0min:9sec ]"