Forum Discussion
nesting switch within aif statement
mgti-noc This should appear in your logs but I can't remember if it's in the audit or ltm log. If you have a syslog server that collects this data you should be able to go through those logs and see exactly when it was changed.
- Ed_SummersMay 25, 2017
Nimbostratus
(YMMV depending on version. I'm using version 12.1.2.)
'monitor' is another collection with the various monitor types underneath it. If you just get the collection from 'monitor' you'll have a list of reference links to the sub-collections underneath it. One way of getting an actual list of monitors is to get the collection of the specific monitor type:
>>> https_monitors = mgmt.tm.ltm.monitor.https_s.get_collection() >>> for mon in https_monitors: ... print(mon.name) ...
Reminder that since the monitor objects are collections, they'll end in 's', or '_s' if the resource already ends in 's'. Example: to get https monitors, use 'https_s'. To get http monitors, use 'https'.
Apologies if I've butchered SDK terminology on collections/sub-collections. I'm still getting used to the environment myself.
- Daniel_TremmelJun 02, 2017
Altostratus
Hi guys,
how can I create a new monitor using the Python SDK?
Unfortunately
monitor = mgmt.tm.ltm.monitors.monitor.create(partition='Common', name='MyMonitor01')
is not working.
AttributeError: '' object has no attribute 'monitors'
regards
Daniel
I'm trying to get a list of all available monitors. Is there a way to loop through the monitor types to then do a get_collection():
for monitor in mgmt.tm.ltm.monitor.get_collection(): for item in monitor.get_collection(): pprint(item)
This clearly doesn't work
It seems I'm not allowed to edit an answer...
What I'm trying to achieve is a select field in a web page that mirrors the behavior of the Health Monitors section of a pool properties page in the BigIP gui, so that I can add/remove monitors from a pool through the rest api.
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com