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

SetObjectProperty Limitations in the API

Votes:

0

I am trying to deploy nearly a thousand new devices, mostly from templates. However, I'm running into what appears to be limitations in the API and I'd like to know if there's anything I can do to circumvent.

1) WMI Service Sensors 2) Network Interface Sensors 3) SQL Statistics Sensors

I'm trying to use the SetObjectProperty API call to modify values in a template sensor, so for instance the interface name, the Service Name or the SQL instance name.

I get a HTTP 200 OK response when I commit the API call but the value doesn't change. All of these values are grayed out in the settings tab of the GUI, so my fear is that these are not able to be changed via the SetObjectProperty API call. Is that correct?

For reference, here is an example:

http://prtg.mydomain.local:8080/api/setobjectproperty.htm?id=<sensor_ID>&name=service&value=ServiceName&username=administrator&passhash=1234567890

Is there a way to create these types of sensors from scratch without copying them from a template? Otherwise I'm looking at needed to manually create many hundreds of sensors by hand, through the GUI so I truly hope there is an automated way to accomplish this same thing.

Thank you, Adam

api read-only setobjectproperty

Created on Nov 3, 2015 7:30:33 PM



2 Replies

Accepted Answer

Votes:

1

Hi Adam,
unfortunately those values cannot be changed through the API. However, even if I won't recommend the same, you might look into editing the config file PRTG Configuration.dat of PRTG directly to change the values in question.
DISCLAIMER: By editing the config you can basically destroy your installation so please edit only a backup and use a trial installation to verify the integrity of the file before putting the same productive! (Also there is no official support for this)

Created on Nov 6, 2015 1:56:57 PM by  Konstantin Wolff [Paessler Support]



Votes:

1

Thank you, it would be really excellent if this were included in the roadmap towards an upcoming feature release! Having to manually walk through the add sensor wizard for hundreds of servers is really not ideal or even possible in some cases. When the API is so full featured for everything else, this seems a glaring oversight.

Kind Regards, Adam

Created on Apr 24, 2016 1:16:41 PM




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.