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.
Article Comments
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).
Feb, 2016 - Permalink
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/
Mar, 2016 - Permalink
Have a look here, there are a few options.
I use the following:
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).
Feb, 2016 - Permalink