Hello,

This is what I am getting when I try to create new group throw

            //Add a new group named "Servers" to the object with ID 1001
            var group = client.AddGroup(3003, "Servers");

            //Add a new device named "dc-1" to the "Servers" group
            var device = client.AddDevice(group, "dc-1");

         or

            var device = client.AddDevice(3001, "dc-1", "192.168.0.1", AutoDiscoveryMode.Automatic);

\/

https://github.com/lordmilko/PrtgAPI/wiki/Object-Creation#groups

this link above /\

Exception thrown: 'PrtgAPI.PrtgRequestException' in PrtgAPI.dll An unhandled exception of type 'PrtgAPI.PrtgRequestException' occurred in PrtgAPI.dll PRTG was unable to complete the request. The server responded with the following error: The parent object (i.e. device/group) for your newly created device doesn't exist anymore. Object creation cancelled.

Could you help me? I am new with PRTG. Thank you in advance.


Article Comments

Hi ruru,

Please note that PrtgAPI is a third party product and is not supported by Paessler, as such for any queries regarding PrtgAPI please ask these on the GitHub issues page, rather than the Paessler forums

Are you able to advise which line of code is actually generating the exception listed above? The AddDevice and AddGroup methods expect the ID of a parent group or probe to be specified. In your example, you've listed two potential parent objects with object IDs 3001 and 3003 respectively; do these object IDs point to groups or probes however?

Regards,

lordmilko


Jul, 2021 - Permalink