What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
300.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

PrtgAPI.PrtgRequestException

Votes:

0

Your Vote:

Up

Down

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.

api prtg prtgapi-dll

Created on Jul 1, 2021 4:18:26 PM by  ruru (0) 1



1 Reply

Votes:

0

Your Vote:

Up

Down

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

Created on Jul 1, 2021 10:48:22 PM by  lordmilko (2,132) 2 1



Please log in or register to enter your reply.


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.