app/nagios3/faq/monitoring windows
From JumpBox Documentation Wiki
How can I monitor Windows?
If you have read the official Nagios manual chapter on Monitoring Windows you may be confused as to how this works on a JumpBox. You aren't alone, the JumpBox configuration differs a little bit from that described in their documentation to accomodate the web based configuration that we include. You have two choices in following this documentation, you may use the web interface as described below, or manually include and edit your windows.cfg file.
Using the Web Configuration Interface
Setup your NSclient++ as described in the Nagios Monitoring Windows page.
- Update the check_nt command if password is needed - If you set a password while installing the above client then you need to change the check_nt command so that the command line includes the -s password option as shown below:
- Define new services to be monitored using the appropriate check_nt command - Now you can define the services that are described in the Monitoring Windows doc by adding services in the services tab. You may provide names and aliases of your choosing, just make sure to put the check_command from the Monitoring document into the Special field in the service command definition. See the following two examples.
- Checking NT Load -
- Checking NT Uptime -
- Adding a Service to a host - Once the appropriate check_nt command and the desired services are created, you can add those services to hosts for monitoring.
- Verifying then saving your changes - After defining the new service types you should go to the generator tab, double check the generated config file and compare the service definitions there to those in the Monitoring Windows document, then save the configuration. The changes should now be visible in Nagios.
Manually Editing the windows.cfg Template
To manually edit the nagios config file to include the windows template you should use the sudo command to edit at root:
sudo nano /usr/local/nagios/etc/nagios.cfg
then, you can include the template windows.cfg file as a config file:
cfg_file=/usr/local/nagios/etc/objects/windows.cfg
It is important to realize that the template file above is not complete, it is intended as a starting point. If you restart nagios without making changes to this file it will fail and tell you that your configuration files have errors. You can get a more verbose listing of those errors by checking the configuration file with the following command:
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
NOTE - Any changes made manually to the Nagios configuration file will not be recognized by the Web Configuration Interface and the two may interfere with each other. If you make any manual changes you are probably best off switching entirely to the manual configuration process.