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

Maintenance Windows by API

Votes:

0

Your Vote:

Up

Down

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 by  psdarwin (10) 1



2 Replies

Votes:

0

Your Vote:

Up

Down

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 Jun 3, 2021 11:41:52 AM by  Timo Dambach [Paessler Support]



Votes:

1

Your Vote:

Up

Down

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 by  psdarwin (10) 1



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.