Dominik_312933
Mar 13, 2018Nimbostratus
Get Status of individual pool monitors via iControl REST
Hi DevCentral community!
I am currently trying to retrieve the status (per individual monitor) for a specific pool or member via iControl REST.
As you can see in the following response, there are currently two monitors (gateway_icmp and http) configured for the given pool, whereas at least one of the monitors needs to be in up state.
GET https://f5.test.lan/mgmt/tm/ltm/pool/~Common~XYZ-Test
{
"kind": "tm:ltm:pool:poolstate",
"name": "XYZ-Test",
"partition": "Common",
"fullPath": "/Common/XYZ-Test",
"monitor": "min 1 of { /Common/gateway_icmp /Common/http }",
"membersReference": {
"link": "https://localhost/mgmt/tm/ltm/pool/~Common~XYZ-Test/members?ver=13.1.0.2",
"isSubcollection": true
}
...
}
However, when trying to get the status of the pool, I only receive information about the total status (in this case up) of the pool, but not the status of the individual monitors.
GET https://f5.test.lan/mgmt/tm/ltm/pool/~Common~XYZ-Test/members
{
"kind": "tm:ltm:pool:members:memberscollectionstate",
"selfLink": "https://localhost/mgmt/tm/ltm/pool/~Common~XYZ-Test/members?ver=13.1.0.2",
"items": [
{
"kind": "tm:ltm:pool:members:membersstate",
"name": "10.0.0.78:1514",
"partition": "Common",
"fullPath": "/Common/10.0.0.78:1514",
"address": "10.0.0.78",
"monitor": "default",
"session": "monitor-enabled",
"state": "up"
...
}
]
}
GET https://f5.test.lan/mgmt/tm/ltm/pool/~Common~XYZ-Test/members/stats
{
"kind": "tm:ltm:pool:members:memberscollectionstats",
"entries": {
"https://localhost/mgmt/tm/ltm/pool/~Common~XYZ-Test/members/~Common~10.0.0.78:1514/stats": {
"nestedStats": {
"kind": "tm:ltm:pool:members:membersstats",
"selfLink": "https://localhost/mgmt/tm/ltm/pool/~Common~XYZ-Test/members/~Common~10.0.0.78:1514/stats?ver=13.1.0.2",
"entries": {
"addr": {
"description": "10.0.0.78"
},
"monitorRule": {
"description": "min 1 of /Common/gateway_icmp /Common/http (pool monitor)"
},
"monitorStatus": {
"description": "up"
},
"nodeName": {
"description": "/Common/10.0.0.78"
},
"poolName": {
"description": "/Common/XYZ-Test"
},
"port": {
"value": 1514
},
"sessionStatus": {
"description": "enabled"
},
"status.availabilityState": {
"description": "available"
},
"status.enabledState": {
"description": "enabled"
},
"status.statusReason": {
"description": "Pool member is available"
},
...
}
}
}
}
}
Is there any way to get the status of the individual monitors (e.g. gateway_icmp --> up, http --> down) for a specific pool, or its members?
Thank you in advance.