Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Server \ How to deploy Icinga server     - Implement firewall function on a closed Linux machine (Linux)

- Python data types summary (Programming)

- Some practical tips Linux (Linux)

- Rails 4.1.6 start being given Could not find a JavaScript runtime (Linux)

- Introduces Linux kernel compilation system and compiler installation (Linux)

- systemctl Command Complete Guide (Linux)

- in no backup ex: error: Xin Tourou ah backup child process has Singles DAT / US person / bin / in no backup ex (Database)

- Tecplot Installation under Linux (Linux)

- When Linux Detailed time zone and common function of time (Linux)

- Linux Defensive / mitigate DDOS attacks (Linux)

- Android Studio Personalization (Linux)

- How to enhance the Nagios server security (Linux)

- To get Java class / jar package path (Programming)

- Linux installation and configuration curl command tool (Linux)

- 24 Docker recommendations (Linux)

- Java Adapter Mode (Programming)

- PHP with FastCGI and mod_php Comments (Server)

- Servlet life cycle works (Programming)

- Composition and dynamic memory allocation C program (Programming)

- Log device files under Linux - logger (Linux)

  How to deploy Icinga server
  Add Date : 2018-11-21      
  Icinga Nagios is a variant, configuration, use almost the same, and is fully compatible with Nagios plug-ins. So the following deployment scenarios for Nagios also used.

It also launched two Chinese versions, icinga-cn original and icinga-pnp4nagios-cn, former and Nagios almost exactly the same, but the interface is in Chinese, while the latter incorporates php4 mapping function can be graphically presented system monitoring information, similar to Cacti.

Icinga server generally refers to its core, but it provides a framework, and can not monitor specific resources, such as CPU, memory, processes and the like. These are monitored by Icinga plugins to achieve.

Remote Linux host monitoring generally in two ways:

1. check_by_ssh widget

For example, I want to see the use of remote Linux server disk space,

# / Usr / local / icinga / libexec / check_by_ssh -H -C 'df -h'

root@'s password:
Filesystem Size Used Avail Use% Mounted on
/ Dev / sda2 7.7G 5.8G 1.6G 79% /
tmpfs 850M 0 850M 0% / dev / shm
/ Dev / sda1 194M 27M 158M 15% / boot
/ Dev / sda4 9.9G 7.2G 2.3G 77% / u01
The plug-in enables secure transmission using SSH will be more secure than NRPE plug, and, in this way, do not need to be monitored remotely deploy any software on the host, but this will cause the CPU load on the host and remote monitoring host is too high . If the host monitor more, it will become a problem, so many administrators choose NRPE plug-in operation and maintenance, it would reduce the CPU load.

2. NRPE plugin

Principle NRPE plugin is to allow Icinga execute Nagios plugins on a remote host, so you can monitor local resources on the remote host, such as CPU, memory, SWAP and other system resources are not exposed to the outside of the machine.

It works as follows:

So this program is implemented in Icinga core + Nagios plugins + NRPE plugin. At the same time, the program used IDOUtils, so, you can save icinga configuration and monitoring data and other information into the database.

First, install dependencies

The main package to be installed into the following categories

GCC compiler
C / C ++ development libraries
GD development libraries
libdbi / libdbi-drivers, database like MySQL or PostgreSQL
In Fedora / RHEL / CentOS system, as follows:

# Yum install httpd gcc glibc glibc-common gd gd-devel

# Yum install libjpeg libjpeg-devel libpng libpng-devel

MySQL installation package and Development

# Yum install mysql mysql-server libdbi libdbi-devel libdbi-drivers libdbi-dbd-mysql

Second, create an account

# / Usr / sbin / useradd -m icinga

# Passwd icinga

If a command is sent from the WEB interface to Icinga, also you need to configure a group, and web users and icinga user to join the group.

# / Usr / sbin / groupadd icinga-cmd

# / Usr / sbin / usermod -a -G icinga-cmd icinga

# / Usr / sbin / usermod -a -G icinga-cmd apache

Third, download the plug-in package and Icinga

Download Icinga cultural project is: http: //sourceforge.net/projects/icinga-cn/files/, here, icinga-cn-1.12.2.tar.xz Download icinga-cn directory.

Icinga plugins download address: http: //sourceforge.net/projects/icinga-cn/files/icinga%20plugins/, here, download nagios-cn-plugins-2.0.3.tar.xz.

icinga nrpe download address: http: //sourceforge.net/projects/icinga-cn/files/icinga%20plugins/, here, download icinga-nrpe-2.14.tar.gz.

Fourth, the installation Icinga Core

That icinga-cn-1.12.2.tar.xz.

# Cd / usr / src /

# Tar xvf /root/icinga-cn-1.12.2.tar.xz

# Cd icinga-cn-1.12.2 /


# ./configure --with-Command-group = icinga-cmd --enable-idoutils

Compiler no problem, then the output is as follows:

 Web Interface Options:
                 HTML URL: http: // localhost / icinga /
                  CGI URL: http: // localhost / icinga / cgi-bin /
                 Main URL: http: //localhost/icinga/cgi-bin/status.cgi allunhandledproblems?
                 UI THEME: ui_theme = ui-smoothness

Review the options above for accuracy. If they look okay,
type 'make all' to compile the main program and CGIs.

!!! Please take care about the upgrade documentation !!!
# Make all

# Make fullinstall

# Make install-config

Fifth, create the MySQL data and IDOUtils

# Mysql -u root -p

mysql> CREATE DATABASE icinga;
Query OK, 1 row affected (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

mysql> quit
# Cd /usr/src/icinga-cn-1.12.2/module/idoutils/db/mysql/

# Mysql -u root -p icinga
IDOUtils modify configuration files

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

db_servertype = mysql
db_port = 3306
db_user = icinga
db_pass = icinga
In fact, this is the default.


Six classic WEB configuration interface

# Cd /usr/src/icinga-cn-1.12.2/

# Make cgis

# Make install-cgis

# Make install-html

# Make install-webconf

Setting Icinga WEB interface login user and password

# Htpasswd -c /usr/local/icinga/etc/htpasswd.users icingaadmin

If you want to change your password by the following command

# Htpasswd /usr/local/icinga/etc/htpasswd.users icingaadmin

Restart Apache service to make the above settings to take effect

# Service httpd restart

Seven, compile and install Icinga 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 --with-cgiurl = / icinga / cgi-bin --with-nagios-user = icinga --with-nagios-group = icinga

# Make

# Make install

Eight, compile and install NRPE plugin

# Cd / usr / src /

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

# Cd icinga-nrpe-2.14 /

# ./configure

# Make

# Make install

# Make install-plugin

# Make install-init

# Make install-xinetd

# Make install-daemon-config

In fact, make install-plugin, make install-init, make install-xinetd, make install-daemon-config may not be implemented, the implementation of the specific role after you make a note, the next recommendations.

Nine, adjust SELinux policy

The simplest is directly off

Temporary shutdown: # setenforce 0

Permanently closed: # vim / etc / sysconfig / selinux

SELINUX = disabled
X. Open IDOUtils and Icinga service

Start IDOUtils Service

# Service ido2db start

Verify Icinga configuration files

# / Usr / local / icinga / bin / icinga -v /usr/local/icinga/etc/icinga.cfg

Output is as follows:

Icinga 1.12.2
Copyright (c) 2009-2015 Icinga Development Team (http://www.icinga.org)
Copyright (c) 2009-2013 Nagios Core Development Team and Community Contributors
Copyright (c) 2009-2014 icinga-cn cultural group
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 02-14-2015
License: GPL

Read configuration data ...
Alert: Unknown 'event_profiling_enabled' configuration settings to remove it from the configuration.!
   Read main config file okay ...
Processing object config directory '/usr/local/icinga/etc/conf.d' ...
Processing object config file '/usr/local/icinga/etc/objects/commands.cfg' ...
Processing object config file '/usr/local/icinga/etc/objects/contacts.cfg' ...
Processing object config file '/usr/local/icinga/etc/objects/notifications.cfg' ...
Processing object config file '/usr/local/icinga/etc/objects/timeperiods.cfg' ...
Processing object config file '/usr/local/icinga/etc/objects/templates.cfg' ...
Processing object config file '/usr/local/icinga/etc/objects/localhost.cfg' ...
Processing object config file '/usr/local/icinga/etc/objects/linux.cfg' ...
Processing object config directory '/ usr / local / icinga / etc / modules' ...
Processing object config file '/usr/local/icinga/etc/modules/idoutils.cfg' ...
   Read object config files okay ...

Running pre-flight check on configuration data ...

Checking services ...
    We checked 17 services.
Check the host ...
    2 checked host.
Check the host group ...
    Host Group 2 have been checked.
Inspection services group ...
    2 service groups have checked.
Check the contact ...
    1 contact has been checked.
Check the contact group ...
    Contact Group 1 have been checked.
Check service upgrades ...
    Checked 0 service upgrades.
Check the service dependencies ...
    0 service dependencies have been checked.
Check the host upgrade ...
    0 checked host upgrade.
Check the host dependencies ...
    0 checked host dependencies.
Check command ...
    Checked 36 commands.
Check the time ...
    6 checked period.
Check module ...
    1 module has been checked.
Check the circuit between the host ...
Check the circuit and host-dependent services ...
Check the global event handler ...
Check compulsive processing of command ...
Check the Miscellaneous Settings ...

Total alarm s: 0
Total errors: 0

Things look okay - No serious problems were detected during the pre-flight check
Start Icinga Service

# Service icinga start

Set the boot from the start

# Chkconfig ido2db on

# Chkconfig icinga on

XI, WEB login screen test

Login Address: http: //

Login user name: icingaadmin

Step Six password login password set by the htpasswd command.
- Linux simple commands (Linux)
- MySQL full-index scan bug (Database)
- RedHat virtual machine to install VMware Tools (Linux)
- The bulk batch multiple rows of data collect (Database)
- Three details reflect the Unix system security (Linux)
- Linux Operating System Security Management Experience (Linux)
- Specifies the open ports of the SUSE firewall settings (Linux)
- Shorewall firewall settings under Ubuntu (Linux)
- Java and C / C ++ data conversion when network communication (Programming)
- C + + secondary pointer memory model (pointer array) (Programming)
- Linux file permissions and access modes (Linux)
- Expert advice: Do not use the computer security IE browser (Linux)
- Vim (Linux)
- Python calls the API interface in several ways (Programming)
- Linux the best download manager uGet (Linux)
- MySQL and MariaDB new master from the cluster configuration GTID (Database)
- C ++ Supplements - locates the new expression (Programming)
- Performance Optimization: Using Ramlog transfer log files to memory (Linux)
- JavaScript Advanced Programming notes event capture and event bubbling (Programming)
- Linux6.1 / 6.5 dual-NIC Binding (Linux)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.