How to deploy the Icinga Client

Source: Internet
Author: User
Tags icinga

How to deploy the Icinga Client

The deployment of the Icinga client is much simpler than that of the server. For the server side, to monitor the server in the following way, it must contain three components: Icinga kernel, Icinga Plugin, and NRPE (Nagios Remote Plugin Executor ). For the Icinga client, you only need to deploy the Icinga plug-in and NRPE.

Icinga cultural project: http://sourceforge.net/projects/icinga-cn/files/

The Icinga plug-in and NRPE are all in the icinga plugins directory.

Here, I downloaded nagios-cn-plugins-2.0.3.tar.xzand icinga-nrpe-2.14.tar.gz.

Create an icinga user

# Useradd icinga-s/sbin/nologin

Install nagios-cn-plugins

# Cd/usr/src/

# Tar xvf/root/nagios-cn-plugins-2.0.3.tar.xz

# Cd nagios-cn-plugins-2.0.3/

#./Configure -- prefix =/usr/local/icinga

The output is as follows:

config.status: creating po/Makefile            --with-apt-get-command:               --with-ping6-command: /usr/sbin/ping6 -n -U -w %d -c %d %s               --with-ping-command: /usr/bin/ping -n -U -w %d -c %d %s               --with-package-name: nagios-plugins               --with-nagios-user:                --with-nagios-group:                        --with-ipv6: yes                      --with-mysql: no                    --with-openssl: yes                     --with-gnutls: no               --enable-extra-opts: yes                       --with-perl: /usr/bin/perl             --enable-perl-modules: no                     --with-cgiurl: /nagios/cgi-bin               --with-trusted-path: /bin:/sbin:/usr/bin:/usr/sbin                   --enable-libtap: no

# Make

# Make install

Set permissions

# Chown-R icinga. icinga/usr/local/icinga/

Install NRPE

# Cd/usr/src/

# Tar xvf/root/icinga-nrpe-2.14.tar.gz

# Cd icinga-nrpe-2.14/

#./Configure

The output is as follows:

*** Configuration summary for nrpe 2.14 12-21-2012 ***: General Options: ------------------------- NRPE port:    5666 NRPE user:    icinga NRPE group:   icinga Icinga user:  icinga Icinga group: icingaReview the options above for accuracy.  If they look okay,type 'make all' to compile the NRPE daemon and client.

Follow the prompts,

# Make all

The output result is as follows:

*** Compile finished ***  make install     - This installs files in /usr/local/icinga  make install-plugin     - This installs init-script files in /usr/local/icinga/libexec  make install-init     - This installs init-script files in /etc/init.d  make install-xinetd     - This installs sample-config/nrpe.xinetd in /etc/xinit.d  make install-init-freebsd     - This installs init-script.freebsd files in /etc/init.d  make install-init-debian     - This installs init-script.debian files in /etc/init.d  make install-init-SUSE     - This installs init-script.suse files in /etc/init.d  make install-daemon-config     - This installs the Nrpe config file in /usr/local/icinga/etcIf the NRPE daemon and client compiled without any errors, youcan continue with the installation or upgrade process.Read the PDF documentation (NRPE.pdf) for information on the nextsteps you should take to complete the installation or upgrade.

For Linux systems, run make install, make install-plugin, make install-init, make install-xinetd, and make install-daemon-config. For more information about the specific functions, see the preceding description.

Modify the configuration file of NRPE

# Vim/usr/local/icinga/etc/nrpe. cfg

Add the address of the Icinga server after allowed_hosts.

allowed_hosts=127.0.0.1,192.168.244.145

 

Start the NRPE Service

#/Etc/init. d/icinga-nrpe start

Starting icinga-nrpe (via systemctl):  Warning: Unit file of icinga-nrpe.service changed on disk, 'systemctl daemon-reload' recommended.                                                           [  OK  ]

# Systemctl daemon-reload

#/Etc/init. d/icinga-nrpe start

Check whether listening is enabled on port 5666.

# Netstat-ntlup | grep 5666

tcp        0      0 0.0.0.0:5666            0.0.0.0:*               LISTEN      26517/nrpe

 

Verify on the server

# /usr/local/icinga/libexec/check_nrpe -H 192.168.244.146

192.168.244.146 is the client address.

If the output is the NRPE version:

NRPE v2.14

Indicates that the server and the client have established communications.

 

Summary:

1. If the following error is reported during verification on the server:

CHECK_NRPE: Error - Could not complete SSL handshake.

Generally, the configuration file of NRPE is not modified, or the firewall rules prevent the connection between the Icinga server and the NRPE process.

2. The shell of the System Account uses/sbin/nologin. At this time, you cannot log on to the system, even if you have given the password.

The so-called "login failure" means that this user cannot use bash or other shells to log on to the system. It does not mean that this account cannot use system resources. For example, in each system account, the print job has the lp account management, and the www server has the apache account management. They can all work on system programs, but they simply cannot log on to the host. Sometimes some services, such as the mail service, are mostly used to receive emails from the host and do not need to log in. If an account tries to connect to my host to obtain the shell, we can reject it. In addition, if I want to let a user with/sbin/nologin know that they cannot log on to the host, they can create the/etc/nologin.txt file, write the reason why the user cannot log on to the file. When the user logs on, the content in the file will appear on the screen.

This article permanently updates the link address:

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.