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: cloning a device with dependency on a sensor
Votes:
0
5 Replies
Votes:
0
Hello,
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
Votes:
0
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.
Votes:
0
Hi,
Did you also tried to duplicate the affected sensors via API or did you duplicated the working sensors via ui?
Votes:
0
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.
Votes:
0
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?
Add comment