In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how to configure Nagios to monitor Windows Server. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Nagios is a multi-functional network monitoring system that can help you easily monitor all devices in your data center. It supports some out-of-the-box usability for Linux systems, but you can also use Nagios to monitor Windows Server by using NSClient++,.
There are several different modes of monitoring Windows in an Nagios environment. The simpler approach discussed in this article is to use the check_nt command, which is already defined in Nagios's commands.cfg file. In future articles, you will also learn how to configure Nagios Remote Plugin Executor (NRPE).
First, the * * step to monitor your Windows environment is to download and install NSClient++ from http://sourceforge.net/projects/nscplus. Determine which version of the software you need before downloading it. The version that supports 64 bits is downloaded by default. If you need to run NSClient++, under 32-bit Windows, you need to download 32-bit MSI from the Files section on the download page.
After downloading NSClient++, open the Windows service interface and configure the NSClient++ service so that it starts automatically. Similarly, you need to make sure that the service log exists with the local system account and can be run automatically from the desktop. * one step is to check the Windows firewall. NSClient++ runs on port 12489. Make sure this port is open in your firewall.
Configure the Nagios server
After configuring the part of Windows, you also have to configure the Nagios server. First, make sure that the check_nt commands are defined in / etc/nagios/objects/commands.cfg. There is also a change that the default configuration does not use a password, so at the end of the command line, add-s nagios (see example 1) so that the check_nt command uses the default password "nagios".
# 'check_nt' command definitiondefine command {command_name check_nt command_line $USER1 $/ check_nt-H $HOSTADDRESS$-p 12489-v $ARG1 $$ARG2 $- s nagios}
Example 1: add-s nagios at the end of the command line to make the check_nt command use the default password.
Then, at / etc/nagios/objects/templates.cfg, you need a template to define how the Windows host should be configured (example 2 will tell you what the definition looks like by default):
Define host {name windows-server; (name of this host template) use generic-host
(inherits the default values of the generic host template)
Check_period 24x7; (Windows servers will be monitored day and night by default) check_interval 5; (actively check the server every five minutes) retry_interval 1; (retry the schedule host check every other minute. ) max_check_attempts 10; (each server is checked ten times (up to)) check_command check-host-alive; (the default command to check whether the server is running. ) notification_period 24x7; (send the report at any time. ) notification_interval 30; (repeat the report every 30 minutes. ) notification_options dline r; (send reports only for specific host conditions. ) contact_groups admins; (the report is sent to admins by default. ) hostgroups windows-servers; (hosts group Windows servers into members. ) register 0; (don't register this, it's just a template)}
Example 2 Windows host definition template-- not a real host, just a template!
After verifying that the template exists, you need to notify Nagios and monitor Windows. Let Nagios look at the windows.cfg file by uncommenting the cfg_file line (discussed in example 3):
# Definitions for monitoring a Windows machinecfg_file=/etc/nagios/objects/windows.cfg
Example 3: uncomment the cfg_file line.
After doing this, you can define that the Windows host is being monitored. This step is done for every windows host to be monitored. You need to define the host item in the windows.cfg file (see example 4):
Define host {use windows-server; (inherits default values from templates. ) host_name winserver; (the name we gave to this mainframe. ) alias My Windows Server; (contact this host with a longer name. ) address 192.168.1.54; IP address of the host (IP address of the host)}
Example 4: define the host part
Now, the first step in configuring Nagios for Windows is to define the devices you want to monitor. This also happens from the windows.cfg file. You can find examples of two of these devices below (example 5).
# # # SERVICE DEFINITIONS# # Create a service for monitoring the version of NSCLient++ that is installed (create a device to monitor the version of the installed NSCLient++) # Change the host_name to match the name of the host you defined above (change the host_name to match the previously defined Host name) define service {use generic-service host_name winserver service_description NSClient++ Version check_command checkntasking client} # Create a service for monitoring the uptime of the server (create a device to monitor server uptime) # Change the host_name to Match the name of the host you defined above (change host_name to match the previously defined host name) define service {use generic-service host_name winserver service_description Uptime check_command checkntasking UPTIME}
Example 5: define the devices to be monitored by Nagios
Read the rest of the windows.cfg file to find out which device checks are available and make sure all the required devices are available. Once you've done this, you can save your changes and restart the Nagios server, using service nagios restart on the Nagios host. This can activate the changes, and then you can monitor the devices on the Windows host from the Nagios interface.
Thank you for reading! This is the end of this article on "how to configure Nagios to monitor Windows Server". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.