Phu
Nov 28, 2020Nimbostratus
BIG-IP can't send emails Alert when match SNMP trap condition defined in user_alert.conf file
My BigIP device is running on version v16.0.1.
I setup /etc/ssmtp/ssmtp.conf file with below option:
- TLS_CA_FILE=/etc/pki/tls/certs/ca-bundle.crt
- root=XXXX@gmail.com
- mailhub=smtp.gmail.com:587
- AuthUser=XXXX
- AuthPass=XYXYX
- UseSTARTTLS=Yes
- UseTLS=Yes
- hostname=bigipA.gmail.com
Testing ssmtp running well: printf "Subject: Test email for K13180\n\nssmtp test mail" | ssmtp -v YYYYYY@gmail.com
I defined user_alert.conf as below - https://support.f5.com/csp/article/K15288
- alert CERTIFICATE_EXPIRED "Certificate (.*) expired" {
- snmptrap OID=".1.3.6.1.4.1.3375.2.4.0.300";
- email toaddress="user@mydomain.com"
- body="Certificate Expired on <BIG-IP>"
- }
- alert CERTIFICATE_WILL_EXPIRE "Certificate (.*) will expire" {
- snmptrap OID=".1.3.6.1.4.1.3375.2.4.0.301";
- email toaddress="user@mydomain.com"
- body="Certificate will Expire on <BIG-IP>"
- }
Testing the email notification:
#tmsh create sys crypto key SOL15288testcert gen-certificate lifetime 10 common-name SOL15288testcert.com
#tmsh run sys crypto check-cert
I don't receive any email for this testing. I don't know why it's not run.
Can anyone help me?!!!
Thanks so much.