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

API - Set Maintenance Interval

Votes:

0

I found this two kb entries:
https://kb.paessler.com/en/topic/62304-restful-one-time-maintenance-window#reply-200661
https://kb.paessler.com/en/topic/61037-maintenance-schedule-once-per-two-weeks-or-more#reply-195796

I'd like to set the maintanence interval by api.

I run the following 3 API Requests. The Response Code was "OK" by all requests. But nothing happens. The Object (a device) of the id doesnt paused between the interval. And in History was no entry set.

https://prtg.teamgruppe.home/api/setobjectproperty.htm?username=prtg-user&passhash=xxxxxxxxxx&id=17606&name=maintstart&value=2020-11-30-17-30-00

https://prtg.teamgruppe.home/api/setobjectproperty.htm?username=prtg-user&passhash=xxxxxxxxxx&id=17606&name=maintend&value=2020-11-30-17-30-00

https://prtg.teamgruppe.home/api/setobjectproperty.htm?username=prtg-user&passhash=xxxxxxxxxx&id=17606&name=maintenable&value=1

By other objects (groups oder devices). It only set the maintenance end time. (i can see it in history). The result: the device paused now and not in future.

api api-maintenance maintenance

Created on Nov 30, 2020 4:44:25 PM

Last change on Dec 1, 2020 6:07:08 AM by  Marijan Horsky [Paessler Support]



5 Replies


Votes:

0

Hi Matthias, thank you for your help.

it fails again:

here are the response values of my test by id 18142 :
Inheritscheduledependency OK
maintenable OK

maintstart Request: https://prtg.teamgruppe.home/api/setobjectproperty.htm?username=prtg-helper&passhash=xxxxxxxx&id=18142&id=17606&name=maintstart&value=2020-12-01-15-30-00
Result: <prtg> <version>20.4.64.1402</version> <error>Die Validierung Ihrer Eingaben war nicht erfolgreich:<br/><ul><li>&quot;Wartung startet&quot; muss vor &quot;Wartung endet&quot; liegen</li></ul><br/>. Das Objekt wurde nicht geändert.</error> </prtg>


The message is confused because i have not startet maintend.
----------------
even stranger is that my tests by 17606 are all response values "OK", but nothing is happened an nothing to see in history/log

best regards

Created on Dec 1, 2020 2:57:40 PM

Last change on Dec 2, 2020 9:22:25 AM by  Matthias Kupfer [Paessler Support]



Votes:

0

Hi Tobias,

You have an error in your query. You duplicated the "id=" parameter. Please remove the duplicate id and the query should work.


Kind regards,
Matthias Kupfer - Team Tech Support

Created on Dec 2, 2020 9:28:43 AM by  Matthias Kupfer [Paessler Support]



Votes:

0

Sorry, I made the mistake while writing the KnowHow entry.

here is the corrext request url: https://prtg.teamgruppe.home/api/setobjectproperty.htm?username=prtg-user&passhash=xxxxxxxxxx&id=18142&name=maintstart&value=2020-12-02-17-10-00

and the response value <prtg> <version>20.4.64.1402</version> <error>Die Validierung Ihrer Eingaben war nicht erfolgreich:<br/><ul><li>&quot;Wartung startet&quot; muss vor &quot;Wartung endet&quot; liegen</li></ul><br/>. Das Objekt wurde nicht geändert.</error> </prtg>

Created on Dec 2, 2020 9:42:11 AM

Last change on Dec 2, 2020 3:16:15 PM by  Matthias Kupfer [Paessler Support]



Votes:

0

You have to end date first and then you can set start date

Created on Feb 1, 2023 8:51:20 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.