![]() |
![]() |
Subject: | API to get the list of devices handled by a collector |
Author: | Sam Urai |
Posted: | 2019-10-28 22:29 |
Subject: | RE: API to get the list of devices handled by a collector |
Author: | Adrian Vergara |
Posted: | 2019-10-29 15:10 |
Hello Sam, there's probably a few ways to go about it, from my experience, I would check the 'getDevice' method in the DeviceRouter class from the JSON API which will return a dictionary with the devices properties where you can find a key:value pair containing the collector information for each device found.
So for example, you could send the call requesting devices from the "Devices" device class (root class), set a high 'limit' parameter to make sure you'll scan all devices in case you have a big deployment (not the prettiest way to do it, you could first make a call to get the actual number of devices and then use that as the limit value). From there you can extract all devices that have the collector value you're looking to change and with that, you can then use the 'setCollector' method from the same router to assign the collector you need.
You can find the documentation for the version you're running in the following link: https://help.zenoss.com/zsd/archive/json-api
Best regards,
Adrian E. Vergara
Subject: | RE: API to get the list of devices handled by a collector |
Author: | Sam Urai |
Posted: | 2019-11-05 23:19 |
< |
Previous zodbscan tool won't wokr |
Next 4.2.5 Collector setup |
> |