Hello All,
I want to change the dependency type of a ping sensor to "Master object for Parent" through the API.
Can anyone tell me how to do this (I'm unable to find in the documentation how to do it).
Regards,
Janten
Article Comments
Hello,
How do you change the dependency to "Master Object" through the API?
Regards
Feb, 2017 - Permalink
Hi,
As described earlier, we will not release this API-Call as it could break your PRTG Installation if not used in the correct way. Additionally, it wouldn't save you time as you have to disable the inheritance manually for each changed object.
Best regards.
Feb, 2017 - Permalink
I found this
https://www.paessler.com/manuals/prtg/object_manipulation#inheritance
Mar, 2019 - Permalink
What do you mean by this statement, "we will not release this API-Call as it could break your PRTG Installation if not used in the correct way"? We have a use case where it would save us 100s of hours to be able to set the dependency of a sensor to another sensor using the API, but you've stated that would break the installation. Does setting the dependency in the GUI break the installation? I'm not sure I understand why only the API-call would break things...
Jun, 2022 - Permalink
Setting the dependency in the GUI does not break anything. Setting the dependency via API might easily create loops which could break the installation.Therefore there isn't such a API call. It's not possible to change inheritance of "Schedules, Dependencies and Maintenance Window Options" via API by design.
Jun, 2022 - Permalink
How would you suggest setting the dependencies for 5000 sensors? Do them manually, one at a time?
Also, the underlying API calls within that sub-menu are accessible, so once I manually disable inheritance, I can still create a loop that breaks my installation? For example, I can manipulate the dependency type to "Select a sensor" and even set the dependency with the API, all things that are under that one checkbox to "Disable inheritance of Schedules, Dependencies, and Maintenance Window".
Jul, 2022 - Permalink
Yes, as it's officially not possible to use the Multi-Edit nor the API to change dependency settings, I'm afraid there's indeed no other way than to change dependency settings manually.
If you are looking to set ping sensors to "Master object for Parent", you could also delete them and recreate them using the Auto-Discovery as workaround, as ping sensors created by auto-discovery will be set to "Master object for Parent" by default.
Jul, 2022 - Permalink
Hi,
Unfortunately, there is not even an undocumented way to change the dependency of an an object via API. You actually can set the dependency to "Master Object", but you are unable to disable the inheritance of the "Schedules, Dependencies and Maintenance Window Options". This is intended to prevent users from breaking their PRTG Installations.
Best regards.
Feb, 2017 - Permalink