Nagios is a linux OS program. You could make a VM install linux then Nagios. Windows servers on rest of network will need agent NSClient++ NSClient is a Windows monitoring agent that allows you to collect vital information from Windows NT/2000/XP servers (CPU load, memory usage, disk usage, service states, processes, and performance data). In order to monitor a Windows desktop or server with Nagios, you must first install on agent on the target machine. This guide takes you through the steps of installing and configuring the Windows agent (NSClient++) in preparation for monitoring the machine with Nagios XI or Nagios Core.
In the previous articles we discussed about Nagios 3.0 Jumpstart guide and How to monitor remote Linux host using Nagios 3.0. In this article, l’ll explain how to monitor remote windows machine and the various service running on the windows server using nagios monitoring server. Following three sections are covered in this article.
I. Overview
II. 4 steps to install nagios on remote windows host
- Install NSClient++ on the remote windows server
- Modify the NSClient++ Service
- Modify the NSC.ini
- Start the NSClient++ Service
III. 6 configuration steps on nagios monitoring server
- Verify check_nt command and windows-server template
- Uncomment windows.cfg in /usr/local/nagios/etc/nagios.cfg
- Modify /usr/local/nagios/etc/objects/windows.cfg
- Define windows services that should be monitored.
- Enable Password Protection
- Verify Configuration and Restart Nagios.
I. Overview
.
Following three steps will happen on a very high level when Nagios (installed on the nagios-server) monitors a service (for e.g. disk space usage) on the remote Windows host.
Following three steps will happen on a very high level when Nagios (installed on the nagios-server) monitors a service (for e.g. disk space usage) on the remote Windows host.
- Nagios will execute check_nt command on nagios-server and request it to monitor disk usage on remote windows host.
- The check_nt on the nagios-server will contact the NSClient++ service on remote windows host and request it to execute the USEDDISKSPACE on the remote host.
- The results of the USEDDISKSPACE command will be returned back by NSClient++ daemon to the check_nt on nagios-server.
Following flow summarizes the above explanation:
Nagios Server (check_nt) —–> Remote host (NSClient++) —–> USEDDISKSPACE
Nagios Server (check_nt) <—– Remote host (NSClient++) <—– USEDDISKSPACE (returns disk space usage)
II. 4 steps to setup nagios on remote windows host
.
Nagios Core Windows Installer
1. Install NSClient++ on the remote windows server
Download NSCP 0.3.1 (NSClient++-Win32-0.3.1.msi) from NSClient++ Project. NSClient++ is an open source windows service that allows performance metrics to be gathered by Nagios for windows services. Go through the following five NSClient++ installation steps to get the installation completed.
(1) NSClient++ Welcome Screen
(2) License Agreement Screen
(3) Select Installation option and location. Use the default option and click next.
(4) Ready to Install Screen. Click on Install to get it started.
(5) Installation completed Screen.
(1) NSClient++ Welcome Screen
(2) License Agreement Screen
(3) Select Installation option and location. Use the default option and click next.
(4) Ready to Install Screen. Click on Install to get it started.
(5) Installation completed Screen.
2. Modify the NSClient++ Service
Go to Control Panel -> Administrative Tools -> Services. Double click on the “NSClientpp (Nagios) 0.3.1.14 2008-03-12 w32” service and select the check-box that says “Allow service to interact with desktop” as shown below.
3. Modify the NSC.ini
(1) Modify NSC.ini and uncomment *.dll: Edit the C:Program FilesNSClient++NSC.ini file and uncomment everything under [modules] except RemoteConfiguration.dll and CheckWMI.dll
(2) Modify NSC.ini and uncomment allowed_hosts. Edit the C:Program FilesNSClient++NSC.ini file and Uncomment allowed_host under settings and add the ip-address of the nagios-server.
Note: allowed_host is located under [Settings], [NSClient] and [NRPE] section. Make sure to change allowed_host under [Settings] for this purpose.
(3) Modify NSC.ini and uncomment port. Edit the C:Program FilesNSClient++NSC.ini file and uncomment the port# under [NSClient] section
(3) Modify NSC.ini and uncomment port. Edit the C:Program FilesNSClient++NSC.ini file and uncomment the port# under [NSClient] section
(4) Modify NSC.ini and specify password. You can also specify a password the nagios server needs to use to remotely access the NSClient++ agent.
4. Start the NSClient++ Service
Start the NSClient++ service either from the Control Panel -> Administrative tools -> Services -> Select “NSClientpp (Nagios) 0.3.1.14 2008-03-12 w32” and click on start (or) Click on “Start -> All Programs -> NSClient++ -> Start NSClient++ (Win32) . Please note that this will start the NSClient++ as a windows service.
Later if you modify anything in the NSC.ini file, you should restart the “NSClientpp (Nagios) 0.3.1.14 2008-03-12 w32” from the windows service.
Later if you modify anything in the NSC.ini file, you should restart the “NSClientpp (Nagios) 0.3.1.14 2008-03-12 w32” from the windows service.
III. 6 configuration steps on nagios monitoring server
.
1. Verify check_nt command and windows-server template
Verify that the check_nt is enabled under /usr/local/nagios/etc/objects/commands.cfg
Verify that the windows-server template is enabled under /usr/local/nagios/etc/objects/templates.cfg
2. Uncomment windows.cfg in /usr/local/nagios/etc/nagios.cfg
3. Modify /usr/local/nagios/etc/objects/windows.cfg
By default a sample host definition for a windows server is given under windows.cfg, modify this to reflect the appropriate windows server that needs to be monitored through nagios.
4. Define windows services that should be monitored.
Following are the default windows services that are already enabled in the sample windows.cfg. Make sure to update the host_name on these services to reflect the host_name defined in the above step.
5. Enable Password Protection
![Install nagios agent on windows 10 Install nagios agent on windows 10](/uploads/1/2/6/1/126122691/644389767.png)
If you specified a password in the NSC.ini file of the NSClient++ configuration file on the Windows machine, you’ll need to modify the check_nt command definition to include the password. Modify the /usr/local/nagios/etc/commands.cfg file and add password as shown below.
6. Verify Configuration and Restart Nagios.
Verify the nagios configuration files as shown below.
Restart nagios as shown below.
Nagios For Windows Server 2012
Verify the status of the various services running on the remote windows host from the Nagios web UI (http://nagios-server/nagios) as shown below.
Best Nagios Book
Nagios Core 3 eBook – I’ve been using Nagios for several years, and I can sleep peacefully at night knowing that Nagios is monitoring all my systems and will warn me about any potential issue, before it becomes critical. I strongly recommend that you read Nagios Core 3 ebook to gain detailed understanding on Nagios. Since Nagios is free software, spending few dollars on the book can be the best investment you can make.
Awesome Nagios Articles
Following are few awesome Nagios articles that you might find helpful.
How To Start Ssh Agent On Windows
> Add your comment