What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

Change dependency of sensor to master through API

Votes:

0

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

api dependency master-object

Created on Feb 8, 2017 1:35:17 PM



8 Replies

Votes:

0

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.

Created on Feb 8, 2017 1:44:20 PM by  Dariusz Gorka [Paessler Support]



Votes:

0

Hello,

How do you change the dependency to "Master Object" through the API?

Regards

Created on Feb 8, 2017 4:06:22 PM



Votes:

0

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.

Created on Feb 9, 2017 6:37:16 AM by  Dariusz Gorka [Paessler Support]



Votes:

0

Created on Mar 20, 2019 11:25:37 PM



Votes:

0

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...

Created on Jun 3, 2022 8:50:35 PM



Votes:

0

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.

Created on Jun 9, 2022 11:01:57 AM by  Timo Dambach [Paessler Support]



Votes:

0

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".

Created on Jul 21, 2022 4:18:15 PM



Votes:

0

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.

Created on Jul 22, 2022 7:02:00 AM by  Timo Dambach [Paessler Support]




Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.