Forum Discussion
When Active/Standby failover send mail
Hello,
I'm trying to get email notifications on my gmail if a BigIP redundancy pair failover occurs.
Here are my settings :
# vi /etc/ssmtp/ssmtp.conf
root=XXXXX@gmail.com
mailhub=smtp.gmail.com:587
Hostname=bigipA.gmail.com
FromLineOverride=YES
TLS_CA_FILE=/etc/pki/tls/certs/ca-bundle.crt
UseSTARTTLS=Yes
UseTLS=Yes
AuthUser=XXXXX@gmail.com
AuthPass=xxxxxxxxxxxx
#vi /etc/alertd/alert.conf
alert BIGIP_SOD_SODERR_SOD_STANDBY {
snmptrap OID=".1.3.6.1.4.1.3375.2.4.0.14";
lcdwarn description="Unit going standby." priority="0";
email toaddress="XXXXX@gmail.com"
fromaddress="root"
body="LTM Failover : going to standby"
}
alert BIGIP_SOD_SODERR_SOD_ACTIVE {
snmptrap OID=".1.3.6.1.4.1.3375.2.4.0.15";
lcdwarn description="Unit going Active." priority="0";
email toaddress="XXXXX@gmail.com"
fromaddress="root"
body="LTM Failover : going to active"
}
sSMTP configuration should be correct, because sending emails can be received
#echo -e "Subject: Test email for K13180\n\nssmtp test mail" | ssmtp -v XXXXX@gmail.com
When failover occurs, it does not work...
How do I change the settings?
Any help is appreciated.
If you tested the SMTP email is working and configured for your feature then maybe see /config/user_alert.conf as this is the only file that you should touch for custom alerts. (https://support.f5.com/csp/article/K30371285 ).
Other usefull links:
https://support.f5.com/csp/article/K54018808
https://support.f5.com/csp/article/K87630102
https://support.f5.com/csp/article/K2446
Also you can create a bash script that triggers the "logger -p " command and add a message to /var/log/ltm (https://support.f5.com/csp/article/K11127 ) and place the script as You can even trigger scripts on the F5 device if the state changes from active to standby or from standby to active by adding the scripts under /config/failover/. For example if you have a bug for a critical process that causes a failover ( you can use the command show /sys ha-status all-properties to check for this https://support.f5.com/csp/article/K20060182 ) but the device does not reboot or fix the process you can run a script to when the device becomes standby to restart the process. (https://support.f5.com/csp/article/K6008 )An article I made about this long ago:
If you tested the SMTP email is working and configured for your feature then maybe see /config/user_alert.conf as this is the only file that you should touch for custom alerts. (https://support.f5.com/csp/article/K30371285 ).
Other usefull links:
https://support.f5.com/csp/article/K54018808
https://support.f5.com/csp/article/K87630102
https://support.f5.com/csp/article/K2446
Also you can create a bash script that triggers the "logger -p " command and add a message to /var/log/ltm (https://support.f5.com/csp/article/K11127 ) and place the script as You can even trigger scripts on the F5 device if the state changes from active to standby or from standby to active by adding the scripts under /config/failover/. For example if you have a bug for a critical process that causes a failover ( you can use the command show /sys ha-status all-properties to check for this https://support.f5.com/csp/article/K20060182 ) but the device does not reboot or fix the process you can run a script to when the device becomes standby to restart the process. (https://support.f5.com/csp/article/K6008 )An article I made about this long ago:
- MichaelyangCirrostratus
Hi Nikoolayy1,
Thank you for your reply
I set it up according to the link below
https://community.f5.com/t5/technical-forum/monitoring-active-standby-failover/m-p/44838
I don't know what's wrong with the settingsAny help is appreciated
- aali86Altostratus
Could you please confirm what i have to mentioned on the authuser and authpass as below
AuthUser=XXXXX@gmail.com
AuthPass=xxxxxxxxxxxx
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com