Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security & DevOps Insights

  • Home
  • About
  • Advertise With US
  • Reviews
  • Contact
  • Toggle search form
Home » How to Monitor Windows Hosts via Nagios
  • Ping 3
    How to convert images from PNG to JPG on WordPress, Windows, and Mac JIRA|Confluence|Apps
  • banner
    How to Integrate TestRail with Cypress Automation
  • feature photo terraform
    How to install Amazon RDS using Terraform Linux
  • Error during connect in the default daemon configuration on Windows
    Preparation failed: The docker client must be run with elevated privileges Version Control System
  • Missing Windows defender
    Missing Windows Defender? Install and manage Microsoft Defender via Windows Security on Windows Server Windows Server
  • WAMP errors
    Apache errors associated with WAMP installation for TeamPass Web Server
  • Slide1
    Read-only Files: Saving Files in VIM Editor on Linux/Unix-like OS Linux
  • RDS Architecture
    The following servers in this deployment are not part of the deployment Pool: Create an RDS Session Host and Collection Windows Server

How to Monitor Windows Hosts via Nagios

Posted on 10/01/201724/09/2024 Dickson Victor By Dickson Victor No Comments on How to Monitor Windows Hosts via Nagios
Windows host monitoring

Learn how to effectively monitor Windows hosts using Nagios Core is an open-source monitoring system designed to monitor systems, networks, and infrastructure (Get metrics for CPU, Disk, Memory, and Services with ease). It provides alerts and notifications about issues and performance problems, allowing system administrators to respond accordingly. Please see how to Block downloads on Microsoft Edge using GPO on Windows Server 2019 and 2022, and how to use Container Insights for Azure Kubernetes Workload.

In addition to the above, Nagios can monitor a variety of system parameters, including server uptime, application performance, and network traffic.

Nagios also offers monitoring and alerting services for servers, switches, applications, and services. Kindly refer to these related guides: How to Install and Configure Nagios on Ubuntu.

To monitor Windows Machines you will need to follow several steps and they are:

  • Install NSClient++ addon on the Windows Machine.
  • Configure Nagios Server for monitoring Windows Machine.
  • Add new host and service definitions for Windows machine monitoring.
  • Restart the Nagios service.

Also, see How to locate and edit the host file on macOS, and how to “Performance and Diagnostics in Microsoft Cloud with Azure Monitor“.

Install NSClient++ addon on the Windows machine

See the following link for more details. The addon acts as a proxy between the Windows machine and Nagios and monitors actual services by communicating with the check_nt plugin. The check_nt plugin already installed on the Nagios Monitoring Server

Note: This can be done traditionally. Once you’ve downloaded the latest stable version, unzip the NSClient++ files into a new C:NSClient++ directory.

Now open an Command prompt and press enter and change to the C:NSClient++ directory.

C:NSClient++

Next, register the NSClient++ service on the system with the following command

nsclient++ /install

Finally, install the NSClient++ systray with the following command.

nsclient++ SysTray

Open the Windows Services Manager and right-click on NSClient go to Properties and then ‘Log On‘ tab and click the checkbox that says “Allow service to interact with the desktop“. If it isn’t already allowed, please check the box to allow it to.

Open NSC.INI file located at C:NSClient++ directory and uncomment all the modules defined in the “modules” section, except for CheckWMI.dll and RemoteConfiguration.dll.

Uncomment the “allowed_hosts” in the “Settings” section and define the IP address of your Nagios Monitoring Server or leave it blank to allow any hosts to connect.

Uncomment the “port” in the “NSClient” section and set to default port ‘12489‘. Make sure to open ‘12489‘ port on Windows Firewall.

Finally, start the NSClient++ service with the following command. Please see How to install Windows Server 2022 on VirtualBox.

nsclient++ /start

If you properly installed and configured, you should see a new icon in the system tray in yellow circle with a black ‘M‘ inside.

Monitor Windows Hosts: Configuring Nagios

Here we have the check_nt command defined already and added to the command.cfg file.
This definition command is used by check_nt plugin to monitor Windows services.

A windows-server host template already created in the templates.cfg file. This template allows you to add new Windows host definitions.

Note: These two files “command.cfg” and “templates.cfg” files can be found at /usr/local/nagios/etc/objects/ directory.

# vi /usr/local/nagios/etc/objects/windows.cfg
# Define a host for the Windows machine we'll be monitoring
# Change the host_name, alias, and address to fit your situation
 define host{
use windows-server ; Inherit default values from a template
host_name winserver ; The name we're giving to this host
alias My Windows Server ; A longer name associated with the host
address 172.xxx.xxx.53 ; IP address of the host
}
 Following services are already added and enabled in windows.cfg file.
If you wish to add some more other service definitions that needs to be monitored, you can simple add those definitions to same configuration file. Make sure to change the host_name
for these all services with host_name defined in the above step.
 define service{
use generic-service
host_name winserver
service_description NSClient++ Version
check_command check_nt!CLIENTVERSION
}
 Add the following service definition to monitor the uptime of the Windows server.
 define service{
use generic-service
host_name winserver
service_description Uptime
check_command check_nt!UPTIME
}
 Add the following service definition to monitor the CPU utilization on the Windows server and generate a CRITICAL alert if the 5-minute CPU load is 90% or more or a WARNING alert if the 5-minute load is 80% or greater.
 define service{
use generic-service
host_name winserver
service_description CPU Load
check_command check_nt!CPULOAD!-l 5,80,90
}
 Add the following service definition to monitor memory usage on the Windows server and generate a CRITICAL alert if memory usage is 90% or more or a WARNING alert if memory usage is 80% or greater.
 define service{
use generic-service
host_name winserver
service_description Memory Usage
check_command check_nt!MEMUSE!-w 80 -c 90
}
 Add the following service definition to monitor usage of the C: drive on the Windows server and generate a CRITICAL alert if disk usage is 90% or more or a WARNING alert if disk usage is 80% or greater.
 define service{
use generic-service
host_name winserver
service_description C: Drive Space
check_command check_nt!USEDDISKSPACE!-l c -w 80 -c 90
}
 Add the following service definition to monitor the W3SVC service state on the Windows machine and generate a CRITICAL alert if the service is stopped.
 define service{
use generic-service
host_name winserver
service_description W3SVC
check_command check_nt!SERVICESTATE!-d SHOWALL -l W3SVC
}
 Add the following service definition to monitor the Explorer.exe process on the Windows machine and generate a CRITICAL alert if the process is not running. 

define service{
use generic-service
host_name winserver
service_description Explorer
check_command check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe

Lastly, uncomment the windows.cfg file in /usr/local/nagios/etc/nagios.cfg.

# vi /usr/local/nagios/etc/nagios.cfg
# Definitions for monitoring a Windows machine
cfg_file=/usr/local/nagios/etc/objects/windows.cfg

Finally, verify the Nagios configuration files for any erros.
# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg 

I hope you found this blog post helpful. If you have any questions, please let me know in the comment session

5/5 - (1 vote)

Thank you for reading this post. Kindly share it with others.

  • Click to share on X (Opens in new window) X
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Telegram (Opens in new window) Telegram
  • Click to share on WhatsApp (Opens in new window) WhatsApp
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Mastodon (Opens in new window) Mastodon
  • Click to share on Bluesky (Opens in new window) Bluesky
  • Click to share on Threads (Opens in new window) Threads
  • Click to share on Nextdoor (Opens in new window) Nextdoor
Network | Monitoring Tags:Monitoring, Network Monitoring

Post navigation

Previous Post: Trend Micro WorryFree Business Security Server Setup
Next Post: WatchGuard Log and Report Server Installation in a VM

Related Posts

  • Windows 11
    How to Change the Lock Screen Wallpaper in Windows 11 Network | Monitoring
  • banner 3
    How to Set Network Adapter Priority on Windows 11 Network | Monitoring
  • Exchange
    Update Global Address List: Recognition Error Network | Monitoring
  • Installgrafana
    Install Grafana on Windows and Windows Server Network | Monitoring
  • troubleshooting Active Directory Replication
    How to troubleshoot Active Directory Replication issues Network | Monitoring
  • Screenshot 4
    Veeam Agent for AIX: Initial Deploy/UUID Error Network | Monitoring

More Related Articles

Windows 11 How to Change the Lock Screen Wallpaper in Windows 11 Network | Monitoring
banner 3 How to Set Network Adapter Priority on Windows 11 Network | Monitoring
Exchange Update Global Address List: Recognition Error Network | Monitoring
Installgrafana Install Grafana on Windows and Windows Server Network | Monitoring
troubleshooting Active Directory Replication How to troubleshoot Active Directory Replication issues Network | Monitoring
Screenshot 4 Veeam Agent for AIX: Initial Deploy/UUID Error Network | Monitoring

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

VEEAMLEGEND

vexpert-badge-stars-5

Virtual Background

GoogleNews

Categories

veeaam100

sysadmin top30a
 
  • Ping 3
    How to convert images from PNG to JPG on WordPress, Windows, and Mac JIRA|Confluence|Apps
  • banner
    How to Integrate TestRail with Cypress Automation
  • feature photo terraform
    How to install Amazon RDS using Terraform Linux
  • Error during connect in the default daemon configuration on Windows
    Preparation failed: The docker client must be run with elevated privileges Version Control System
  • Missing Windows defender
    Missing Windows Defender? Install and manage Microsoft Defender via Windows Security on Windows Server Windows Server
  • WAMP errors
    Apache errors associated with WAMP installation for TeamPass Web Server
  • Slide1
    Read-only Files: Saving Files in VIM Editor on Linux/Unix-like OS Linux
  • RDS Architecture
    The following servers in this deployment are not part of the deployment Pool: Create an RDS Session Host and Collection Windows Server

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,841 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon

Tags

AWS Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Deployment Services Windows Server 2016

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.