Hi everybody,
i'm taking a first look on PRTG and am quite impressed so far. Currently I'm trying to use the API. As I am a web developer I am familiar with HTTP requests and GET parameters. I already tried to rename an object via the API and it works well. Now I was wondering if it's possible to plan a maintenance window respectivele a planned downtime by using the API, e.g.
https://myIP/api/setobjectproperty.htm?id=myID&name=maintenance&sdate=xxxx&edate=xxxx or https://myIP/api/setobjectproperty.htm?id=myID&name=newdowntime&sdate=xxxx&edate=xxxx
In addition I am missing an overview where I could see all property values I could use (e.g. Host, Name, etc.). If it is already existing I wasn't able to find it :-(
Can somebody help me with this issue?
Kind regards, Stefanie
Article Comments
Hi Greg,
thanks for your reply. I'll give it a try but would be a nice feature for the future :-)
Kind regards, Stefi
Sep, 2013 - Permalink
After discussing the request with the API developer, it seems that this is possible but somewhat difficult as you need three calls to set that data.
http://server/api/setobjectproperty.htm?id=IDOFSENSOR&name=maintenable&value= 0 or 1 http://server/api/setobjectproperty.htm?id=IDOFSENSOR&name=maintend&value=(Date in the format YYYY-MM-DD-HH-MM-SS) http://server/api/setobjectproperty.htm?id=IDOFSENSOR&name=maintstart&value=(Date in the format YYYY-MM-DD-HH-MM-SS)
Sep, 2013 - Permalink
With the API you cannot schedule maintenance directly for the device or the sensor but you can pause sensors for a duration or indefinitely and then resume them with the API as well. See the documentation in your web interface for the syntax.
Sep, 2013 - Permalink