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

Maintenance Windows by API

Votes:

0

Is there an API call to set a maintenance window for a group? I found an old KB question (https://kb.paessler.com/en/topic/57793-plan-maintenance-window-via-api) but was unable to make it work.

api maintenance-window prtg

Created on Jun 1, 2021 5:12:49 PM



2 Replies

Votes:

0

Hello,

These API calls should still work. You may need to break the inheritance for "Schedules, Dependencies and Maintenance Windows"first. You may also need to provide credentials within the API call. this can look like this:

/api/setobjectproperty.htm?username=prtguser&passhash=xxxxxxxxxx&id=ID&name=Inheritscheduledependency&value=0
/api/setobjectproperty.htm?username=prtguser&passhash=xxxxxxxxxx&id=ID&name=maintenable&value=1
/api/setobjectproperty.htm?username=prtguser&passhash=xxxxxxxxxx&id=ID&name=maintstart&value=(Date in the format YYYY-MM-DD-HH-MM-SS)
/api/setobjectproperty.htm?username=prtguser&passhash=xxxxxxxxxx&id=ID&name=maintend&value=(Date in the format YYYY-MM-DD-HH-MM-SS)
Also have a look here.

Created on Jun 3, 2021 11:41:37 AM by  Timo Dambach [Paessler Support]

Last change on Mar 28, 2023 8:33:52 AM by  Sasa Ignjatovic [Paessler Support]



Votes:

1

I figured it out. I had to set up a schedule that's always on, turn off inheritance, and set it to that schedule. Then the other three API calls actually set up a maintenance window.

It does appear the sequence also matters - maintstart, then maintend, then maintenable.

Created on Jun 8, 2021 5:52:16 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.