Cara Install Nagios Core di Centos 8 Server

Assalamu’alaikum Warahmatullahi Wabarakatuh, Selamat pagi sobat blogger sekalian, apa kabar semuanya... Pada kesempatan kali ini saya akan share bagaimana cara install nagios core di centos 8 server dan bagaimana cara konfigurasinya.
Pada tutorial kali ini, sobat akan belajar cara menginstal dan mengkonfigurasi Nagios Core di Centos 8 Server. Sebelumnya pastikan pada konfigurasi SELinux dalam settingan disabled. Silahkan ikuti step by step cara installasinya.
1. Prasyarat
Pastikan SELinux dalam dalam keadaan disabled[root@nagios ~]# getenforce DisabledNagios membutuhkan Server Web (httpd), PHP, kompiler dan pustaka pengembangan. Instal semua paket dalam satu perintah dibawah ini.
[root@nagios ~]# yum -y install httpd php gcc glibc glibc-common wget perl gd gd-devel unzip zip tar nano wget
[root@nagios ~]# systemctl start httpd [root@nagios ~]# systemctl enable httpdCek ststus Httpd pastikan service berjalan dengan baik.
[root@nagios ~]# systemctl status httpd ? httpd.service - The Apache HTTP Server Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor prese> Drop-In: /usr/lib/systemd/system/httpd.service.d +-php-fpm.conf Active: active (running) since Fri 2020-05-22 07:08:27 WIB; 6min ago Docs: man:httpd.service(8) Main PID: 25075 (httpd) Status: "Total requests: 37; Idle/Busy workers 100/0;Requests/sec: 0.0905; B> Tasks: 213 (limit: 11492) Memory: 26.2M CGroup: /system.slice/httpd.service +-25075 /usr/sbin/httpd -DFOREGROUND +-25077 /usr/sbin/httpd -DFOREGROUND +-25078 /usr/sbin/httpd -DFOREGROUND +-25079 /usr/sbin/httpd -DFOREGROUND +-25080 /usr/sbin/httpd -DFOREGROUND May 22 07:08:26 nagios.server systemd[1]: Stopped The Apache HTTP Server. May 22 07:08:26 nagios.server systemd[1]: Starting The Apache HTTP Server...Tambahkan Service Http di Firewalld
[root@nagios ~]# firewall-cmd --add-service=http --permanent [root@nagios ~]# firewall-cmd --reload
Baca Juga : Cara Install Observium di Centos 7
Baca Juga : Cara Install Observium di Ubuntu Server 20.04
2. Install Nagios Core
Buat user dan grup nagios untuk memungkinkan perintah eksternal dapat dijalankan melalui Web interface. lalu Tambahkan user dan apache untuk menjadi bagian dari grup yang dibuat.
[root@nagios ~]# useradd nagios [root@nagios ~]# groupadd nagcmd [root@nagios ~]# usermod -a -G nagcmd nagios [root@nagios ~]# usermod -a -G nagcmd apacheDownload Nagios core lalu extract file tersebut
[root@nagios ~]# cd /tmp/ [root@nagios tmp]# wget https://github.com/NagiosEnterprises/nagioscore/releases/download/nagios-4.4.6/nagios-4.4.6.tar.gz [root@nagios tmp]# tar -zxvf nagios-4.4.6.tar.gz [root@nagios tmp]# cd nagios-4.4.6/Compile dan install nagios pada system
[root@nagios nagios-4.4.6]# ./configure --with-nagios-group=nagios --with-command-group=nagcmd [root@nagios nagios-4.4.6]# make all [root@nagios nagios-4.4.6]# make install [root@nagios nagios-4.4.6]# make install-init [root@nagios nagios-4.4.6]# make install-config [root@nagios nagios-4.4.6]# make install-commandmodeInstall nagios web interface dengan perintah dibawah ini
[root@nagios nagios-4.4.6]# make install-webconf [root@nagios nagios-4.4.6]# cd ~Buat user account (nagiosadmin) untuk login ke web interface Nagios. ingat-ingat password yang anda buat untuk user nagiosadmin anda akan membutuhkannya nanti.
[root@nagios ~]# htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin New password: [Masukan password] Re-type new password: [Masukan password] Adding password for user nagiosadminRestart service httpd
[root@nagios ~]# systemctl restart httpd
3. Install Nagios Plugins
Download Nagios Plugin pada direktori /tmp lalu extract file tersebut.[root@nagios ~]# cd /tmp/ [root@nagios tmp]# wget https://nagios-plugins.org/download/nagios-plugins-2.3.3.tar.gz [root@nagios tmp]# tar -zxvf nagios-plugins-2.3.3.tar.gz [root@nagios tmp]# cd nagios-plugins-2.3.3/Compile dan install nagios plugin
[root@nagios nagios-plugins-2.3.3]# ./configure --with-nagios-user=nagios --with-nagios-group=nagios [root@nagios nagios-plugins-2.3.3]# make [root@nagios nagios-plugins-2.3.3]# make installJalankan perintah dibawah ini untuk pengecekan nagios pastikan tidak ada error
[root@nagios ~]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg Nagios Core 4.4.6 Copyright (c) 2009-present Nagios Core Development Team and Community Contributors Copyright (c) 1999-2009 Ethan Galstad Last Modified: 2020-04-28 License: GPL Website: https://www.nagios.org Reading configuration data... Read main config file okay... Read object config files okay... Running pre-flight check on configuration data... Checking objects... Checked 8 services. Checked 1 hosts. Checked 1 host groups. Checked 0 service groups. Checked 1 contacts. Checked 1 contact groups. Checked 24 commands. Checked 5 time periods. Checked 0 host escalations. Checked 0 service escalations. Checking for circular paths... Checked 1 hosts Checked 0 service dependencies Checked 0 host dependencies Checked 5 timeperiods Checking global event handlers... Checking obsessive compulsive processor commands... Checking misc settings... Total Warnings: 0 Total Errors: 0 Things look okay - No serious problems were detected during the pre-flight check
[root@nagios ~]# systemctl start nagios [root@nagios ~]# systemctl enable nagiosCek status nagios pastikan service nagios running
[root@nagios ~]# systemctl status nagios
? nagios.service - Nagios Core 4.4.6
Loaded: loaded (/usr/lib/systemd/system/nagios.service; enabled; vendor pres>
Active: active (running) since Fri 2020-05-22 07:11:32 WIB; 19min ago
Docs: https://www.nagios.org/documentation
Main PID: 13246 (nagios)
Tasks: 6 (limit: 11492)
Memory: 3.2M
CGroup: /system.slice/nagios.service
+-13246 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios>
+-13247 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/>
+-13248 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/>
+-13249 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/>
+-13250 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/>
+-13251 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios>
May 22 07:11:32 nagios.server nagios[13246]: wproc: Successfully registered man>
May 22 07:11:32 nagios.server nagios[13246]: wproc: Registry request: name=Core>
May 22 07:11:32 nagios.server nagios[13246]: wproc: Registry request: name=Core>
4. Access Nagios Web Interface
Akses Nagios melalui web browser lalu masukan pada url http://IP_Address/nagios lalu masukan user dan password nagiosadmin.

Tampilan Dashboard Nagios Core
Tampilan Service Nagios Core
Artikel Selanjutnya : Cara Konfigurasi Nagios di Centos 8 Server
Posting Komentar untuk "Cara Install Nagios Core di Centos 8 Server"