Do you ever need to reboot or do maintenance on your Windows Server? Then if the server is monitored by NetEye, you’ll surely want to mark it in downtime so as not to have notifications sent out for problems arising due to maintenance, and/or to be able to have the correct SLA marked for your Server Uptime and Service Availability.
To make this easy to do on a Windows machine you can start by downloading this PowerShell script: neteye_set_host_and_service_downtime.ps1.
You’ll have to make a few modifications to the script in order to get it to work:
The script has the following usage:
neteye_set_host_and_service_downtime.ps1 <DMIN> <COMMENT> [<HOSTNAME>]
DMIN: Downtime minutes starting from now
COMMENT: The downtime comment to add
HOSTNAME: If not given the script will use the local FQDN host name in lower case.
Now, calling the script manually or within a reboot or maintainance script will set the Host and ALL its services on the NetEye/Icinga2 API into Downtime.
I hope you can use and enjoy this script for your daily work.