> Packages >= 2.9 provide an option in the setup wizard to disable this.
> Defaults to disabled.
-Validate the configuration on Windows open an administrator terminal
+Validate the configuration on Windows open an administrative Powershell
and run the following command:
```
-C:\WINDOWS\system32>cd "C:\Program Files\ICINGA2\sbin"
-C:\Program Files\ICINGA2\sbin>icinga2.exe daemon -C
+C:\> cd C:\Program Files\ICINGA2\sbin
+
+C:\Program Files\ICINGA2\sbin> .\icinga2.exe daemon -C
```
**Note**: You have to run this command in a shell with `administrator` privileges.
-Now you need to restart the Icinga 2 service. Run `services.msc` from the start menu
-and restart the `icinga2` service. Alternatively, you can use the `net {start,stop}` CLI commands.
+Now you need to restart the Icinga 2 service. Run `services.msc` from the start menu and restart the `icinga2` service.
+Alternatively open an administrative Powershell and run the following commands:
+
+```
+C:\> Restart-Service icinga2
+
+C:\> Get-Service icinga2
+```
-
Now that you've successfully installed a Windows agent, please proceed to
the [detailed configuration modes](06-distributed-monitoring.md#distributed-monitoring-configuration-modes).
change that by [adding a new rule](https://support.microsoft.com/en-us/kb/947709).
```
-C:\WINDOWS\system32>netsh advfirewall firewall add rule name="ICMP Allow incoming V4 echo request" protocol=icmpv4:8,any dir=in action=allow
+C:\> netsh advfirewall firewall add rule name="ICMP Allow incoming V4 echo request" protocol=icmpv4:8,any dir=in action=allow
```
#### Icinga 2 <a id="distributed-monitoring-windows-firewall-icinga2"></a>
you'll also need to ensure that port `5665` is enabled.
```
-C:\WINDOWS\system32>netsh advfirewall firewall add rule name="Open port 5665 (Icinga 2)" dir=in action=allow protocol=TCP localport=5665
+C:\> netsh advfirewall firewall add rule name="Open port 5665 (Icinga 2)" dir=in action=allow protocol=TCP localport=5665
```
#### NSClient++ API <a id="distributed-monitoring-windows-firewall-nsclient-api"></a>
plugin is used to query NSClient++, you need to ensure that its port is enabled.
```
-C:\WINDOWS\system32>netsh advfirewall firewall add rule name="Open port 8443 (NSClient++ API)" dir=in action=allow protocol=TCP localport=8443
+C:\> netsh advfirewall firewall add rule name="Open port 8443 (NSClient++ API)" dir=in action=allow protocol=TCP localport=8443
```
For security reasons, it is advised to enable the NSClient++ HTTP API for local
The Icinga 2 package on Windows already provides several plugins.
Detailed [documentation](10-icinga-template-library.md#windows-plugins) is available for all check command definitions.
-Add the following `include` statement on all your nodes (master, satellite, agent):
-
-```
-vim /etc/icinga2/icinga2.conf
-
-include <windows-plugins>
-```
-
Based on the [master with agents](06-distributed-monitoring.md#distributed-monitoring-master-agents)
scenario we'll now add a local disk check.
Keep notes which could be important for your monitoring, and add service
checks later on.
+> **Tip**
+>
+> Use an administrative Powershell to gain more insights.
+
+```
+cd C:\ProgramData\icinga2\var\log\icinga2
+
+Get-Content .\icinga2.log -tail 10 -wait
+```
+
## Enable Debug Output <a id="troubleshooting-enable-debug-output"></a>
### Enable Debug Output on Linux/Unix <a id="troubleshooting-enable-debug-output-linux"></a>
The debug log file can be found in `/var/log/icinga2/debug.log`.
+You can tail the log files with an administrative shell:
+
+```
+cd /var/log/icinga2
+tail -f debug.log
+```
+
Alternatively you may run Icinga 2 in the foreground with debugging enabled. Specify the console
log severity as an additional parameter argument to `-x`.
### Enable Debug Output on Windows <a id="troubleshooting-enable-debug-output-windows"></a>
-Open a command prompt with administrative privileges and enable the debug log feature.
+Open a Powershell with administrative privileges and enable the debug log feature.
```
-C:> icinga2.exe feature enable debuglog
+C:\> cd C:\Program Files\ICINGA2\sbin
+
+C:\Program Files\ICINGA2\sbin> .\icinga2.exe feature enable debuglog
```
Ensure that the Icinga 2 service already writes the main log into `C:\ProgramData\icinga2\var\log\icinga2`.
-Restart the Icinga 2 service and open the newly created `debug.log` file.
+Restart the Icinga 2 service in an administrative Powershell and open the newly created `debug.log` file.
```
-C:> net stop icinga2
-C:> net start icinga2
+C:\> Restart-Service icinga2
+
+C:\> Get-Service icinga2
+```
+
+You can tail the log files with an administrative Powershell:
+
+```
+C:\> cd C:\ProgramData\icinga2\var\log\icinga2
+
+C:\ProgramData\icinga2\var\log\icinga2> Get-Content .\debug.log -tail 10 -wait
```
## Configuration Troubleshooting <a id="troubleshooting-configuration"></a>
[...]
```
+On Windows, use an administrative Powershell:
+
+```
+C:\> cd C:\Program Files\ICINGA2\sbin
+
+C:\Program Files\ICINGA2\sbin> .\icinga2.exe object list
+```
+
You can also filter by name and type:
```