Forum Discussion
Satoshi_Toyosa1
Apr 26, 2018Employee
From tmsh, type list ltm monitor and TAB completion. You will find the list of monitor types.
In iControl REST, the /mgmt/tm/ltm/monitor returns a list of objects. Each object represents the endpoint for a type: e.g.,
{
"reference": {
"link": "https://localhost/mgmt/tm/ltm/monitor/diameter?ver=13.1.0"
}
},
For curl users, it's as simple as grepping the link lines:
curl -sku admin: https://localhost/mgmt/tm/ltm/monitor | python -m json.tool | grep link
In Python API, the object is represented as dict, so you can do something like this:
from f5.bigip import ManagementRoot
mgmt = ManagementRoot('mgmtPort', 'user', 'pass')
monitor = mgmt.tm.ltm.monitor.get_collection()
for t in monitor:
print(t['reference']['link'])
You can use the link value as is to obtain the monitors under a specific type.