Email notification of node/vs down

I have searched for a while now, and have not found a solution.

Alertd appears to be the method of sending an email alert; how do I tell it a node is down?

Or a custom scripted monitor looked like a candidate.

I am not necessarily looking for the solution - just guidance of where to investigate further.

Hello,

First, you’d want to associate a monitor on the pool. Then you need to configure postfix to send mail remotely. And then configure alertd to send email. There are a few related solutions on AskF5 that you can use as a guide for this:

SOL3667: Configuring SNMP trap alerts to send email notifications

SOL3664: Configuring BIG-IP to deliver locally-generated email messages

And if you want to generate a message based on a custom log event, refer to SOL3727:

SOL3727: Configuring custom SNMP traps

Aaron

Posted By hoolio on 01/28/2008 10:19 AM

There are a few related solutions on AskF5 that you can use as a guide for this:

SOL3667: Configuring SNMP trap alerts to send email notifications

Aaron

Regardiong this one, is there a way to add a default recipient email address?

The example only says about per alert config:

alert BIGIP_BIGPIPE_BP_CONFIGURATION_LOADED {

snmptrap OID=“.1.3.6.1.4.1.3375.2.4.0.28”;

email toaddress=“demo@askf5.com”

fromaddress=“root@bigip1.askf5.com”

body=“The test of this Solution worked!”

}

regards

As far as I’m aware, you need to configure each field individually for every alert definition.

I think there are some variables available for the hostname of the unit, but after digging through old notes, I can’t find any documentation of this. Does anyone else know how you can use a variable which is resolved to the hostname of the unit in the alert.conf file?

Also, once you configure the alert.conf, make sure to back it up as I think it gets overwritten in upgrades.

Aaron

Aaron,

I just wanted to thank you for your helpful post. I was looking to do something similar to the original poster and your links were exactly what I needed. Thanks,

d

I’d like to do the same thing. But how am I able to tell BigIP that a node is down?

You would need to configure a monitor for the pool. If the pool member(s) fail to respond correctly to the monitor requests, the monitoring daemon, bigd, will mark the member down and a syslog event is triggered.

Take a look at the LTM configuration guide for your version on AskF5.com for details on configuring monitors. Feel free to reply if you have any questions.

Aaron

Thanks for your reply hoolio. I checked the links above and found that SNMP traps can be made to send email. Can a node down event generate a SNMP trap?

Sure. Take a look at SOL3727 for details on how to configure alertd to trigger an email notification when a node is marked down.

alert.conf sample:

alert BIGIP_MCPD_MCPDERR_POOL_MEMBER_MON_STATUS {
snmptrap OID=".1.3.6.1.4.1.3375.2.4.0.10";
email toaddress="support@example.com"
fromaddress="root@bigip.example.com"
body="Pool Member 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="support@example.com"
fromaddress="root@bigip.example.com"
body="Pool Member Monitor Status Up"
}
alert BIGIP_MCPD_MCPDERR_NODE_ADDRESS_MON_STATUS {
snmptrap OID=".1.3.6.1.4.1.3375.2.4.0.12";
email toaddress="support@example.com"
fromaddress="root@bigip.example.com"
body="Node Address Monitor Status Down!"
}
alert BIGIP_MCPD_MCPDERR_NODE_ADDRESS_MON_STATUS_UP {
snmptrap OID=".1.3.6.1.4.1.3375.2.4.0.13";
email toaddress="support@example.com"
fromaddress="root@bigip.example.com"
body="Node Address Monitor Status Up"
}

Aaron

I checked the alert.conf file on 9.3.1 and I found this.

alert BIGIP_MCPD_MCPDERR_POOL_MEMBER_MON_DOWN “Pool member (.*?) : (.*?) monitor status down.” {

snmptrap OID=“.1.3.6.1.4.1.3375.2.4.0.10”

}

Would the ip address and port no. of the log message be substituted into (.*?) : (.*?) automatically, so that I can modify like this?

alert BIGIP_MCPD_MCPDERR_POOL_MEMBER_MON_DOWN “Pool member (.*?) : (.*?) monitor status down.” {

snmptrap OID=“.1.3.6.1.4.1.3375.2.4.0.10”

email toaddress=“a@b.com”

fromaddress=“root@bigip.com”

body=“Pool member (.*?) : (.*?) monitor status down.”

}

The email message already includes the IP address and port in the email subject. I don’t think the regex is applied to the syslog message when generating the body, so I don’t think the expansion you’ve listed will work for getting the IP:port in the email body. I think there are some wildcards you can use in the email body. but I haven’t been able to find any reference to them. Maybe you could open a case with F5 Support if you want to pursue this?

With this alert.conf entry:

alert BIGIP_MCPD_MCPDERR_POOL_MEMBER_MON_STATUS {
        snmptrap OID=".1.3.6.1.4.1.3375.2.4.0.10";
        email toaddress="admin@example.com"
                fromaddress="root@bigip.example.com"
                body="Node Status Down!"
}

This email is sent:

From: root@bigip.example.com

Sent: Wednesday, March 26, 2008 5:38 PM

To: Admin

Subject: 01070638:5: Pool member 1.1.1.1:80 monitor status down.

Node Status Down!

Aaron

Thanks hoolio. I’ll give it a shot.

Hi Aaron,

I tried this sample and noticed the following:

1) Only BIGIP_MCPD_MCPDERR_POOL_MEMBER_MON_STATUS is available from the /var/tmpfs/run/bigip_error_maps.dat file.

2) Only OID=“.1.3.6.1.4.1.3375.2.4.0.10” never got activated (not .11)

3) I received multiple emails for the notification. Is this normal?

Thanks,

/Robert

Hello,

is there any difference between the two posted alerts,

both use the same OIDs but have different descriptions,

will it be ok to leave the first ones in alter.conf and just add the last ones to the user_alter.conf?

/*    
     * from bigd (CR36393) -- changed from mcpd messages in v9.2.0 (CR46190) and hotfix v9.0.5    
     * For the following 4 alerts, messages need to be used in pattern match to    
     * distiguish different ipaddr, port, etc. So, if these messages are changed,    
     * the changes in alert system need to be done accordingly.    
     */    
    alert BIGIP_MCPD_MCPDERR_POOL_MEMBER_MON_DOWN "Pool member (.*?).*?) monitor status down." {    
            snmptrap OID=".1.3.6.1.4.1.3375.2.4.0.10"    
    }    
    alert BIGIP_MCPD_MCPDERR_POOL_MEMBER_MON_UP "Pool member (.*?).*?) monitor status up." {    
            snmptrap OID=".1.3.6.1.4.1.3375.2.4.0.11"    
    }    
        
    alert BIGIP_MCPD_MCPDERR_NODE_ADDRESS_MON_DOWN "Node (.*?) monitor status down." {    
            snmptrap OID=".1.3.6.1.4.1.3375.2.4.0.12"    
    }    
    alert BIGIP_MCPD_MCPDERR_NODE_ADDRESS_MON_UP "Node (.*?) monitor status up." {    
            snmptrap OID=".1.3.6.1.4.1.3375.2.4.0.13"    
    }
alert BIGIP_MCPD_MCPDERR_POOL_MEMBER_MON_STATUS {   
   snmptrap OID=".1.3.6.1.4.1.3375.2.4.0.10";   
   email toaddress="support@example.com"   
   fromaddress="root@bigip.example.com"   
   body="Pool Member 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="support@example.com"   
   fromaddress="root@bigip.example.com"   
   body="Pool Member Monitor Status Up"   
   }   
      
   alert BIGIP_MCPD_MCPDERR_NODE_ADDRESS_MON_STATUS {   
   snmptrap OID=".1.3.6.1.4.1.3375.2.4.0.12";   
   email toaddress="support@example.com"   
   fromaddress="root@bigip.example.com"   
   body="Node Address Monitor Status Down!"   
   }   
   alert BIGIP_MCPD_MCPDERR_NODE_ADDRESS_MON_STATUS_UP {   
   snmptrap OID=".1.3.6.1.4.1.3375.2.4.0.13";   
   email toaddress="support@example.com"   
   fromaddress="root@bigip.example.com"   
   body="Node Address Monitor Status Up"   
   }

Is there any way to insert the poolname into the email body?

Hello,

I got this working, I really would like it,

but today I received 600 Emails from the BigIP where I added the email alerts.

This happend 2 times.

Is there a reason for this behaviour ?

greetings

Heiko

Hey guys. I have this setup working for all our health monitors, but i would like to change 2 things. 1) Add/change hostname (instead of ip). 2) (and this is the most important) I want to include which health monitor has marked the node down.

In our setup we have some webservers with multiple virtualhosts where the same node is in multiple pools with different health monitors.

ingard,

I don’t think either request is possible. There isn’t a lookup done in the alerting process to see what node name might be configured for a particular pool member’s address. And I don’t think the monitoring daemon, bigd, includes the monitor name that marked the pool member down in the alert, so alertd wouldn’t be able to include it in the alert message. You could open a case with F5 Support to find out if there are workarounds though.

Aaron

I just did, its too bad really as it would be very usefull to know which monitor did the flapping that occured “last night”

You could enable logging on bigd, but I think you’d get too much logging for everyday use if you have a large number of pools. To enable logging, you can run ‘b db bigd.debug enable’. The output is written to /var/log/bigdlog. To disable the logging, run ‘b db bigd.debug.disable’.

If you get more info on this from support, can you reply back?

Thanks,

Aaron

Willdo, that debug output is really nice. I wish i knew about that option last time i was debugging a health monitor. All output from the health monitors goes there - really nice when u’re trying to see whats going on.