Nagiosql add monitoring host and enable alarm mechanism on Nagios

Source: Internet
Author: User

Monitoring Windows Hosts

Nagios monitors Windows system hosts with three implementations: Snmp,nsclient++,nrpe, the next two ways to install the agent on Windows, this document only describes using the nsclient++ method to monitor Windows

Installed and configured by the Monitoring machine Windows host plug-in

Http://nsclient.org/nscp/downloads

Here I use the 0.3.8.zip version, found that with the latest version of 0.3.9 in Windows Server2003 SP1 compatibility, not start up

Unzip it and execute the install command

You need to add -noboot parameter to install, otherwise it will be problematic

Unzip to edit Nsc.ini, remove the preceding semicolon as shown

In the settings section to allow host access to the server IP address, here to the seat, enter your Nagios server IP can

In the Nsclient section, open the default listening port of Nsclinet 12489 and allow access to the host name of the machine, save exit after editing.

Then use the command Netstat–an to check that the port service is already running.

Run to the server again. /check_nrpe–h to monitor the host IP address of the server, see the show as shown through no problem

Use Nagiosql to add a host to monitor

Supervise-host-add

Set host name, address, select template

Then add the other services needed, first add the use of the C disk, supervision-services-add

Overall setting status please follow the instructions as shown

Above is just a way to explain the definition of a service, in fact, have already defined the relevant services to monitor, so we can call these services directly, want to learn more, you can click on the changes to see how each item is set. (You want to monitor what you learn by yourself and then extrapolate to define the services you want.)

Add the services defined above for the current host (and return to the currently defined host) select "Service Options"-Select the defined needs monitoring services, in fact, in the definition of the service can also select the host, you can also select the host here Services

Remember to select the write configuration here and restart the Nagios service.

Execute once from top to bottom

You can see the following interface diagram on the Nagios interface over time

The corresponding service options in the graphical monitoring interface point out the corresponding graphical monitoring interface.

Beautify the server logo icon

As shown in if the device is a router we are behind it plus a diagram by the icon, is the service to add the server icon, a glance can distinguish what type of device belongs to, easy to manage the difference,

[By reading the official documentation, there are four variables available in the host definition that specify the icon file name for each host, and the default storage location is/usr/local/nagios/share/images/logos
Icon_image: Can use GIF, PNG, or JPG file, the recommended image size is 40x40
Icon_image_alt: The alt attribute value for the image element in HTML syntax
Vrml_image:nagios provides the ability to draw three-dimensional images using the VRML language, do not use transparent images (PNG, GIF), preferably using JPG
Statusmap_image: Provided to statusmap CGI script to use the picture, the server to support GD, the file type is GD2]

Winserver2k3 the icon before the server is not added

Note that the host configuration file is under the/etc/nagiosql/hosts directory

Edit the host profile that you want to add the icon to, and then add two lines as shown

After restarting the Nagios service, you can see the icon coming out.

Monitoring Linux Hosts
Nagios monitors Linux servers because monitoring is done by plugins, and monitoring Linux uses Nrpe plugins primarily.

First of all, a brief introduction of the Nrpe monitoring base, and monitoring process, and then step by step configuration of an instance implementation of monitoring the Linux server

The Nrpe consists of a total of two parts:
Check_nrpe plug-in: Running on the monitoring host
NRPE Daemon: Running on a remote Linux host (usually a monitored machine)
The entire monitoring process:
When Nagios needs to monitor the service or resource conditions of a remote Linux host:
1:nagios runs the Check_nrpe plugin, we want to tell it what to check in the Nagios configuration file.
The 2:check_nrpe plugin connects to the remote Nrpe daemon via SSL.
3:nrpe Daemon will run the appropriate Nagios plug-in to perform checks on local resources or services.
4:nrpe Daemon Returns the results of the check to the Check_nrpe plugin, which the plugin submits to nagios for processing.
Note: NRPE daemon requires Nagios plug-ins and NRPE to be installed on remotely monitored Linux hosts, otherwise, daemon cannot do any monitoring. Because the communication between them is encrypted SSL, you need to install SSL

Nrpe and Nagios-plugins are installed on the monitored side

Add a Nagios user and then download the plugin

wget http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.15.tar.gz

Unzip the plugin

Compiling the installation

Confirm the existence of the relevant data files after loading

Download Nrpe

wget http://prdownloads.sourceforge.net/sourceforge/nagios/nrpe-2.12.tar.gz

Extract

Compiling the installation

      • This article is from: Linux Tutorial Network

Nagiosql add monitoring host and enable alarm mechanism on Nagios

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.