Forum Discussion

cawong23_136311's avatar
cawong23_136311
Icon for Altostratus rankAltostratus
Nov 29, 2016

Pools member down equal or over 50% can send alert

Hi all,

 

Is that any way to do so other than irule?

 

If only irule can do so is that any reference?

 

Thanks in advance!

 

1 Reply

  • Hi cawong23, you could use an iCall script triggering an ltm log events related to the pool that you want to monitor. If you have a pool with 10 members, you can attach a monitor and make the pool down when more than 5 nodes are down. When the pool go down, this create an events in ltm file. You have to create an iCall script triggered by that event. The script should contains a script for send an alert. I have done something similar counting apm active sessions, if they rise a limit the script send me an e-mail. The script for sending an e-mail is the following:

     

     

    sys icall script { app-service none definition { tmsh::log_level notice set destinatari "rcpt to:first@dude.com\r\nrcpt to:second@dude.com\r\n" set subject "50% nodes down" set relay "relay2.dude.com" set port "25" set hostname [tmsh::get_field_value [lindex [tmsh::get_config sys global-settings] 0] hostname] exec echo -e "helo $hostname\r\nmail from:\r\n$destinatari\r\ndata\r\nsubject: $subject $hostname SESSIONI $active_sessions \r\n.\r\n" | nc $relay $port } description none events none }

     

    regards

     

    Leonardo