Repeat SNMP Email notofications when pool member is down
I'm currently receiving SNMP notifications when pool members go up and down with the following configuration.
alert BIGIP_MCPD_MCPDERR_POOL_MEMBER_MON_STATUS { snmptrap OID=".1.3.6.1.4.1.3375.2.4.0.10"; email toaddress="user@f5.com" fromaddress="f5@f5.com" body="Pool member monitor status down" } alert BIGIP_MCPD_MCPDERR_POOL_MEMBER_MON_STATUS_UP { snmptrap OID=".1.3.6.1.4.1.3375.2.4.0.11"; email toaddress="user@f5.com" fromaddress="f5@f5.com" body="Pool member monitor status up" }
Everything works just fine with the above config. I receive a notification when a pool member goes up, and one for when it goes down. The application team wants these notifications a little differently though. Instead of 1 notification per action (i.e. up or down), they want a notification sent to them every 5 minutes while a pool member remains down. So every 5 mins, they want to receive notifications of a pool being down, and would stop after the pool member comes back up. With iRules, I suspect that this is definitely do-able. I'm thinking the logic would be something like, when a pool is down, check if pool is still down every 5 minutes. If it is, then fire off another email notification that pool is down until pool is back up.
Or maybe this can be done through alert.conf? Looking for some direction here. Thanks.