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:
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
Article Comments
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
Apr, 2016 - Permalink
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)
Nov, 2015 - Permalink