Forum Discussion

Ravi_75522's avatar
Ravi_75522
Icon for Nimbostratus rankNimbostratus
Jan 24, 2012

How to define a health monitor to check the status of state and disable it

Hello Team,

 

We are currently using 10.2.2 version and the there is a requirement to have a compound monitor.

 

first monitor 1) healthCheckAlive.html - returns the string "Alive" this monitor checks for the status code "Alive" and marks the node available. This should be done every 90 secs

 

 

Second Monitor 2) healthCheckStatus.html Returns 2 states: "Available" - allowing new sessions and existing sessions "MaxCapacity" - only allow existing sessions. This will return if the JVM reaches a certain % used. The % used should be a configurable value. Default 80%

 

 

Upon seeing the message "MaxCapacity" the node should be disabled so that the no new sessions are processed and the existing sessions are handled.

 

 

How do I configure this compund monitor
  • Hi Ravi,

    Here are two sample monitors that should do this:

    
    monitor alive_http_monitor {
       defaults from http
       interval 90
       timeout 271
       recv "Alive"
       send "GET /healthCheckAlive.html HTTP/1.0\r\nConnection: Close\r\n\r\n"
    }
    
    monitor alive_disable_http_monitor {
       defaults from http
       recv disable "MaxCapacity"
       recv "Available"
       send "GET /healthCheckStatus.html HTTP/1.0\r\nConnection: Close\r\n\r\n"
    }
    

    Here are some details on the receive disable field in the monitor from the online help:

    This setting works like Receive String, except that the system marks the node or pool member disabled when its response matches Receive Disable String but not Receive String. To use this setting, you must specify both Receive Disable String and Receive String.

    Aaron