New Question
 
 
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 PRTG
Download >>

 

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

 

Top Tags


View all Tags


scripting enabling and disabled alerts

Votes:

0

Your Vote:

Up

Down

How can I programmatically, via PowerShell or some other scripting language, disable alerts or set up maintenance windows for devices? When I patch my servers, I want to disable the alerts for, say, 15 minutes before I run the patches.

prtg scripting windows

Created on Feb 22, 2016 3:47:46 PM by  chlsmith (0) 1



Best Answer

Accepted Answer

Votes:

7

Your Vote:

Up

Down

I have update my Powershell PRTG Admin module to handle pausing of devices. You can now:

  • Pause a device/sensor, for a given timeframe, with a message
  • Pause This Device (looks at the servers IP/hostname, finds it in PRTG, then pauses with timeframe and message)
  • Resume This Device

The last 2 are great and pausing before windows updates.

I have written up all the details here: https://thedomainiown.wordpress.com/prtg-related/pause-a-sensor/

Created on Mar 9, 2016 10:31:41 AM by  AndrewG (1,783) 2 2



2 Replies

Votes:

8

Your Vote:

Up

Down

Have a look here, there are a few options.

I use the following:

https://prtgserver/api/pauseobjectfor.htm?id=8645&duration=30&pausemsg=auto_paused_for_server_maint&username=prtgadmin&passhash=1112233445

You have to create a GPO (or local GPO) that runs this website (inside a script) as the server is shutdown. It will pause the device for 30 minutes. If your server does not restart in 30 minutes, then you will start to get alarm again.

The downside to a GPO is that if someone shutdowns a server by mistake, then you will not know for 30 minutes. You can get around this by not having a GPO, and instead have another process to run windows updates and then reboot if needed.

Or 3rd option, have a GPO action on shutdown, but it will only pause the server if its between 2am and 4am (for example).

Created on Feb 23, 2016 3:51:45 AM by  AndrewG (1,783) 2 2

Last change on Feb 23, 2016 7:07:38 AM by  Luciano Lingnau [Paessler]



Accepted Answer

Votes:

7

Your Vote:

Up

Down

I have update my Powershell PRTG Admin module to handle pausing of devices. You can now:

  • Pause a device/sensor, for a given timeframe, with a message
  • Pause This Device (looks at the servers IP/hostname, finds it in PRTG, then pauses with timeframe and message)
  • Resume This Device

The last 2 are great and pausing before windows updates.

I have written up all the details here: https://thedomainiown.wordpress.com/prtg-related/pause-a-sensor/

Created on Mar 9, 2016 10:31:41 AM by  AndrewG (1,783) 2 2



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.