Forum Discussion

Darren_M_19965's avatar
Darren_M_19965
Icon for Nimbostratus rankNimbostratus
Jun 11, 2012

Need some direction Monitor vs iRule to determine to fail over

So, as the title and summary state, I'm looking for some direction here.

 

I need to know how to accomplish the following.

 

One can assume the following simple configuration:

 

OS/Hardware: 2 Windows 2003r2 servers behind an F5.

 

We'll call them Svr1 and Svr2. They are effectively identical.

 

Purpose:

 

The servers are transactional and receive a plain text IP request string on port 1200. Process the request and respond on the same port to the client.

 

Simplified Sample Request:

 

VALIDATEADDRESS|ADDR_LINE1-1|East Street|ADDR_LINE2-1|Nickerson Road|ADDR_LINE3-1|MA|ADDR_CITY-1|Marlborough|ADDR_COUNTRY-1|US|ADDR_ZIP-1|01752|ADDR_STATE-1|MA|SFCUSTNUM|101|AUDIT_USER|mdarren|LANGUAGE|en_US|

 

Result:

 

TRANSTYPE|VALIDATEADDRESS|ERRCODE|000000000|ADDRVALIDATE_TYPE|CSZIP|

 

 

Normally, the F5 is weighted so that Svr1 gets all the messages. However, if Svr1, the service, or the port is down I want to fail over to Svr2. Also, if for any reason I get an error code NOT equal to ERRCODE|00000000 I want to fail over as well. And, when the fail over DOES occur, I want to send an email from the F5 notifying of the fault.

 

So, my question is, which tool set should I use to accomplish this?

 

Thanks in advance,

 

Darren M

 

2 Replies

  • You don't necessarily need a pool monitor (a common monitor for all members). You can have one or more specific monitor(s) per member.

     

    In your case, define a TCP-type customised monitor for Svr1 with "recv" set to "ERRCODE|00000000" and Scr2 a genetic TCP-type monitor. Set Svr1's "priority" to 1 and Scr2's "priority" to 0 and pool's "min active members" to 1. This will give you the active(Svr1)-standby(Svr2).

     

     

    Regarding emails, I don't have experience with that, but I'd say you'd need an iRule to generate a log message that'd be translated into a customised trap. See:

     

    SOL3727: Configuring custom SNMP traps - http://support.f5.com/kb/en-us/solutions/public/3000/700/sol3727.html

     

    SOL3667: Configuring alerts to send email notifications - http://support.f5.com/kb/en-us/solutions/public/3000/600/sol3667.html

     

    SOL11127: Testing SNMP traps on BIG-IP (9.4.x - 11.x) - http://support.f5.com/kb/en-us/solutions/public/11000/100/sol11127.html

     

    also

     

    SOL6414: Determining which alerts are pre-configured to trigger an SNMP trap - https://support.f5.com/kb/en-us/solutions/public/6000/400/sol6414.html
  • @epaalx Thank you for your response! Looks like I have a lot of reading to do. I really do appreciate the direction and will look further into the email notification.

     

    Best regards,

     

    Darren M