Joel_Breton
May 24, 2017Nimbostratus
Using the Python SDK for monitors
I'm starting to use the python SDK and I can't figure out how to access the monitor objects on the BIGIP.
Here's my code for displaying the nodes
from f5.bigip import ManagementRoot
mgmt = ManagementRoot('IP Address', 'user', 'password)
nodes = mgmt.tm.ltm.nodes
for node in nodes.get_colletion():
print(node.name)
Here's my code for displaying the monitors
from f5.bigip import ManagementRoot
mgmt = ManagementRoot('ip address', 'user', 'password')
monitors = mgmt.tm.ltm.monitors
for monitor in monitors.get_collection()
print(monitor.name)
I read the documentation located http://f5-sdk.readthedocs.io/en/latest/index.html
The difference between monitors and node in the documentation is the (star) * is separated by colon in the node portion. Don't know if that makes a difference. REST Kind -> tm:ltm:monitors* REST Kind -> tm:ltm:node:*
Any thoughts would help