4) Install Icinga2 plugin
Icinga2 will collect the service information based on the monitoring plugins. So, we need to install nagios plugin using below command.
# For RHEL/CentOS/Fedora 21 and older system # # yum install nagios-plugins-all # For Fedora 21 and later systems # # dnf install nagios-plugins-all # For openSUSE systems # # zypper install nagios-plugins
5) Install IDO modules for MySQL
We are going to Install IDO modules for MySQL which will use for Icinga2 Web interface and other web interfaces. The DB IDO (Database Icinga Data Output) modules for Icinga 2 take care of exporting all configuration and status information into a database.
# For RHEL/CentOS/Fedora 21 and older system # # yum install icinga2-ido-mysql # For Fedora 21 and later systems # # dnf install icinga2-ido-mysql # For openSUSE systems # # zypper install icinga2-ido-mysql
6) Setting up the MySQL database
Setting up the MySQL database for Icinga2.
# Setting up the MySQL database Icinga2 # # mysql -u root -p MariaDB [(none)]> CREATE DATABASE icinga; Query OK, 1 row affected (0.00 sec) MariaDB [(none)]> GRANT SELECT, INSERT, UPDATE, DELETE, DROP, CREATE VIEW, INDEX, EXECUTE ON icinga.* TO 'icinga'@'localhost' IDENTIFIED BY 'icinga'; Query OK, 0 rows affected (0.01 sec) MariaDB [(none)]> exit Bye # Importing the Icinga 2 IDO schema into database # # mysql -u root -p icinga < /usr/share/icinga2-ido-mysql/schema/mysql.sql # Enabling the IDO MySQL module # # icinga2 feature enable ido-mysql warning/cli: Feature 'ido-mysql' already enabled. Make sure to restart Icinga 2 for these changes to take effect. # For SysVinit systems # # service restart icinga2 # For Systemd systems # # systemctl restart icinga2.service
7) Setup Firewall Rules
If you installed iptables you have to allow the httpd and its port to work outside the world.
# All Distro # # iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT # service iptables save # For RHEL/CentOS 7 and Fedora # # firewall-cmd --permanent --add-service=http # firewall-cmd --permanent --add-service=https
8) Setting Up External Command Pipe
Web interfaces and other Icinga addons are able to send commands to Icinga 2 through the external command pipe.
# enable the External Command Pipe # # icinga2 feature enable command # For SysVinit systems # # service icinga2 restart # For Systemd systems # # systemctl restart icinga2.service # Adding the webserver's user to the group icingacmd # # usermod -a -G icingacmd apache
Ref : Icinga2 installation
That’s it as of now, Stay tune with 2daygeek for Latest Linux Geeks….)
@disqus_PmNcuXZEXJ:disqus,
Good catch, updated article according that.
Your service commands are backwards. Commands should look like:
service icinga2 restart
Can I request you guys please post how to add windows clients for monitoring via icinga 1 and 2 which is installed on cent OS7
@disqus_XsA1T94pFK:disqus,
Noted into todo list. Will publish ASAP