My Windows server takes several minutes to shut down, and I receive multiple Down alerts about services running on it. Is it possible to prevent the alerts from happening?
Q: My Windows server runs a number of busy services and takes several minutes to shut down. While it shuts down, I receive many alerts about its services being inaccessible. Why?
A: Your services are most probably depending on PING monitor on the same server. Network services are one of last to shut down, thus PING might be the last monitor to actually shut down.
You might raise time required to enter Down state condition for monitors in question, but it’s not the best workaround: the higher is that interval, the more later you will be notified of actual problems with the service, if they ever happen.
You can use Windows firewall to block access to ICMP (protocol used by PING Monitors) at early stages of shutdown, to prevent PING from responding. You will only then receive alert about PING going down, and all the depending service monitors will be stopped by dependency, without sending any alerts.
Open Main parameters of a monitor in question and check Dependency section. It should look like this:
Below are instructions on how to turn off PING response early, as shutdown sequence is being performed.
Windows XP and Windows Server 2003 family
In case you are using Windows XP or Windows Server 2003 type of OS, follow these steps:
1. Make sure Windows firewall is enabled.
2. Create a directory, say, C:\Scripts, and two files in it:
disable-icmp.cmd with the following content:
netsh firewall set icmpsetting type = All mode = Disable
enable-icmp.cmd with the following content:
netsh firewall set icmpsetting type = All mode = Enable
3. Follow the instructions to set disable-icmp.cmd as shutdown script.
4. Follow the instructions to set enable-icmp.cmd as startup script.
Important: if you use third party firewall software, refer to its documentation to disable and enable ICMP communication (on shutdown and startup, correspondingly).
Windows Vista or later Windows versions (including servers)
In case you are using Windows Vista or later Windows versions (desktop – Windows 7, Windows 8 etc; servers – Windows Server 2008 and later versions):
1. Make sure Windows firewall is enabled.
2. Create a directory, say, C:\Scripts, and two files in it:
disable-icmp.cmd with the following content (all on single line):
netsh advfirewall firewall add rule name="ALL ICMP V4" protocol=icmpv4:any,any dir=in action=block
enable-icmp.cmd with the following content (all on single line):
netsh advfirewall firewall delete rule name="ALL ICMP V4" protocol=icmpv4:any,any dir=in action=block
3. Follow the instructions to set disable-icmp.cmd as shutdown script.
4. Follow the instructions to set enable-icmp.cmd as startup script.
Important: if you use third party firewall software, refer to its documentation to disable and enable ICMP communication (on shutdown and startup, correspondingly).
Important: only break ICMP communication using the above technique if you receive multiple “Down” alerts as explained in the beginning. Please note that working ICMP exchange can be vital for certain network services.
Related topics