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

API - Set Maintenance Interval

Votes:

0

Your Vote:

Up

Down

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 by  tobias_loerke (0) 1

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



4 Replies


Votes:

0

Your Vote:

Up

Down

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 by  tobias_loerke (0) 1

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



Votes:

0

Your Vote:

Up

Down

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

Your Vote:

Up

Down

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 by  tobias_loerke (0) 1

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



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.