Hi all
We have a vTM running the latest version and we want to configure a health monitor that will look at an HTTP GET response and do the following:
if the http get string says 1 - leave node as online
if the http get string says 2 - drain node
if anything else - mark node offline
Is this doable? Any suggestions?
Xonacs,
Your inquiry is a bit more complex than a standard HM. So what you can do is to create a custom perl script that can be uploaded to the vTM under External Program Monitor. Once you have perl script created you can navigate to:
Catalog>Monitors>Create New Monitor>External Program Monitor> Select the custom monitor
and upload your script.
Within the script you should be able to parse the status of each node using API response and mark them based on status per pool node. The permitted values should match based on the status code values (1,2,3, 4 or 5)
URI Endpoint: /api/tm/6.1/status/local_tm/statistics/nodes/per_pool_node/*
The state of this node.
• Type: Enum(String)
• SNMP name: "perPoolNodeState"
• Permitted values:
"alive": alive(1)
"dead": dead(2)
"unknown": unknown(3)
"draining": draining(4)
"drainingtodelete": drainingtodelete(5)
See attached snippet of the proposed logic of the perl script.
I hope I answered your inquiry.
Genard