When I clone a device or group through the following HTML API call the resulting group or device ends up with the "Schedules, Dependencies, and Maintenance Window" inheritance turned off (ie. pointing to itself) even though the original had it turned on.
https://PRTGHost/api/duplicateobject.htm?id=objectID&name=GroupName&targetid=targetID&auth
If I clone the same device or group to the same destination using the web interface (right click, clone) it keeps the inheritance on.
I am using the API as I have 100's of groups to clone. I really don't want to have to go into every group and every device that has been cloned and update this setting. (I understand that I cannot use the API to change the inheritance of "Schedules, Dependencies, and Maintenance Window")
Article Comments
The original device has the "Schedules, Dependencies, and Maintenance Window" inheritance turned on. ie.it inherits from the group above.
The cloned device ends up with the "Schedules, Dependencies, and Maintenance Window" inheritance turned off and the dependency points to its-self. I would like it to keep the inheritance turned on just like the device it was cloned from.
Mar, 2018 - Permalink
If I turn off inheritance on my master device (the one I am cloning) there is an empty configuration there (not pointing to anything). I don't know how the cloned device ends up pointing the dependency to itself.
Mar, 2018 - Permalink
Seems like th duplicateobject call via API works slightly different and doesn't copy all configuration nodes. Use this one instead:
https://<prtg fqdn>/duplicateobject.htm?id=<source objid>&name=<new name>&host=<host>&serviceurl=<service url>&searchtext=&targetid=<objid of parent group>
Kind regards,
Stephan Linke, Tech Support Team
Mar, 2018 - Permalink
When you enable the dependency, is the configuration still there? Or is it not set?
Kind regards,
Stephan Linke, Tech Support Team
Mar, 2018 - Permalink