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

API: cloning a device with dependency on a sensor



Hi. I am creating a sensor S1. And a template device TD1. I add a dependency for the device on the sensor S1. Via the API I clone the device many times. I check in the PRTG UI and the dependency is there, correctly set on S1 for all cloned devices. I then try to "Simulate error" for S1. The result I am expecting is for is for all dependent devices to go into "Pause by dependency" state. Which does not happen. However if I clone the device directly from the PRTG UI, then it works fine: when S1 is in simulated error mode the cloned device goes into Pause state. Any advise on what I shall do? Thanks.

api clone dependency

Created on Aug 7, 2020 4:29:28 AM

5 Replies




Thank you for your post.

I have tested this, and it seems to work even for devices cloned with the API. Is the S1 sensor on the TD1 device, or is it on a different device?

Can you please share the API call that you have used to clone the device?

Kind regards,
Sasa Ignjatovic, Tech Support Team

Created on Aug 7, 2020 9:41:24 AM by  Sasa Ignjatovic [Paessler Support]



Thanks Sasa for the help, this is becoming really annoying for me as it should work but it actually does not. Commanding sensor S1 is in the same group, different device, say DeviceX The dependent, cloned device, say DeviceA is at the same hierachy level as DeviceX API call to clone the template device is(GET): /api/duplicateobject.htm?id=templateDeviceId&name=DeviceA&targetid=...&username=...&passhash=...

I have tested this myself for the past 2 weeks now. In PRTG UI all looks ok, dependency sensor S1 appears in the list of DeviceA. However, DeviceA does not react when S1 goes into simulated error mode. Any other device which I duplicate using PRTG UI, looks exactly the same as DeviceA and it does go into "Pause by dependency" state.

Created on Aug 7, 2020 1:27:23 PM




Did you also tried to duplicate the affected sensors via API or did you duplicated the working sensors via ui?

Created on Aug 10, 2020 8:59:05 AM by  Marijan Horsky [Paessler Support]



I am not sure I understand the question. Commanding sensor S1 has been created in the UI, as was DeviceX. Template device(and its sensors) was created in the UI. Cloned device DeviceA was created via API. Its sensors were implicitly created when device was cloned.

Created on Aug 10, 2020 9:07:45 AM



So if I understand you correctly, if you clone DeviceX with the API it does not get paused when the sensor in DeviceA is down. But, if you clone DeviceX thru the UI, the device gets paused correctly.

Have you tried restarting the PRTG core server?
Does the dependency work in the cloned device if you reset the dependency manually in it?

Created on Aug 11, 2020 7:04:55 AM by  Sasa Ignjatovic [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.