Forum Discussion
wilfred_pascasi
Nimbostratus
Jul 31, 2006send an email when failover occurs
I would like to know if there is a way to receive an email from the bigip when it failover from active to standby or vice versa. I am running version 4.5.7.
- I'm not sure how this ties into iControl. I guess you could build an iControl app that monitors the self-ips on the shared address of the BIG-IP. When the self-ip changes you can have your app send out the email.
- wilfred_pascasi
Nimbostratus
Joe, - Actually, most likely the simplest way is to monitor the System Id (from the System::SystemInfo::get_system_id() method). This is a UUID that is based in the primary mac on the system. If a failover occurs and you are monitoring the system on the shared address, the value of the system id will change. You could alternately use one of the serial numbers from the System::SystemInfo::get_system_information() method as this identifier. Another option is the Networking::AdminIP::get_list() that will return a list of the admin ip addresses on the device.
String id = get_unique_id(); while (1) { String id2 = get_unique_id(); if ( id2 != id ) { send_email_to_someone(); id = id2; } // Don't flood the BIG-IP with calls. Sleep in between requests. sleep_some_amount_of_time(); }
- Loc_Pham_101863Historic F5 AccountOr if your BIG-IP is configured for outgoing mails, you can configure alertd to send an email when the system is going Active or Standby, as shown through this AskF5 solution:
- wilfred_pascasi
Nimbostratus
The last suggestion regarding alertd does not work in my environment because I am running version 4.5.7. I call F5 support and I was told that their solution (sol2198) would not work either. So practically all they could tell me is that I need to write some script/code in order to get notification when failover occurs. - Loc_Pham_101863Historic F5 AccountNot sure if this interface is available in 4.x, but System.Failover interface has the method get_failover_state that should return the Active or Standby state.
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects