{"id":4461,"date":"2019-10-19T11:03:39","date_gmt":"2019-10-19T08:03:39","guid":{"rendered":"https:\/\/kifarunix.com\/?p=4461"},"modified":"2024-03-12T22:13:03","modified_gmt":"2024-03-12T19:13:03","slug":"install-nagios-plugins-on-centos-8","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-nagios-plugins-on-centos-8\/","title":{"rendered":"Install Nagios Plugins on CentOS 8"},"content":{"rendered":"\n
This guide will walk you through how to install Nagios Plugins on CentOS 8. Nagios plugins<\/a> are standalone extensions to Nagios Core that enables Nagios to monitor databases, operating systems, services, applications, network equipment, protocols etc.<\/p>\n\n\n\n To use Nagios Plugins, you need to have installed and Setup Nagios Core server. Follow the link below to install Nagios server on CentOS 8.<\/p>\n\n\n\n Install Nagios Server on CentOS 8<\/a><\/p>\n\n\n\n Once you have setup the Nagios Core server, proceed to install the Nagios plugins.<\/p>\n\n\n\n Well, there are two ways in which you can install Nagios Plugins.<\/p>\n\n\n\n We will cover the two installation methods.<\/p>\n\n\n\n Nagios plugins are build from the source code. Hence, you need to install required build tools and dependencies.<\/p>\n\n\n\n Some of the packages below might have been installed if you followed the Nagios guide above.<\/p>\n\n\n\n Next, download Nagios plugins source code.<\/p>\n\n\n\n You can check for any latest Nagios plugins on Nagios Plugins page<\/a>.<\/p>\n\n\n\n Once downloaded, extract it by running the command below<\/p>\n\n\n\n Navigate to Nagios plugins source directory and run the configure script to adapt the plugins to the system and check for any missing dependency.<\/p>\n\n\n\n If there is no configuration error, proceed to compile Nagios.<\/p>\n\n\n\n Ensure that user nagios is already created before you can proceed. You might need to install NRPE agent first.<\/p>\n\n\n\n The compile Nagios plugins.<\/p>\n\n\n\n You can now run the command below to install Nagios Plugins.<\/p>\n\n\n\n This will install default Nagios plugins under the Now restart Nagios core service.<\/p>\n\n\n\n After that, login Nagios Server Web interface on the browser to confirm that the localhost services and state are now being monitored.<\/p>\n\n\n\n Check the local host status by clicking on the Hosts<\/strong> under Current Status<\/strong> on the left panel.<\/p>\n\n\n\n Check the status of the localhost services by clicking Services<\/strong> under Current Status<\/strong> on the left panel.<\/p>\n\n\n\n There you go. You have successfully installed Nagios Plugins on CentOS 8 for localhost state and and service status monitoring.<\/p>\n\n\n\n It is also possible to install Nagios plugins from EPEL repository.<\/p>\n\n\n\n Install EPEL repository on CentOS 8<\/p>\n\n\n\n Once the installation is done, you can search for the available Nagios plugins by running the command below;<\/p>\n\n\n\n You can also run the command below to list all plugins.<\/p>\n\n\n\n You can now install the specific plugins that you require. For example, to install Nagios plugins that checks the load, http, users, processes, disk space, swap space, uptime,dns, run the command below;<\/p>\n\n\n\n Plugins that are installed using the package manager as stored under There you go.<\/p>\n\n\n\n In our next guide, we will discuss how to install Nagios Remote Execution Plugins for remote host monitoring.<\/p>\n\n\n\n See Other similar guides by following the link below;<\/p>\n\n\n\n Nagios SNMP Monitoring of Linux Hosts on AlienVault USM\/OSSIM<\/a><\/p>\n\n\n\n How to Install Nagios Plugins and NRPE agents on CentOS 7\/RHEL 7\/Fedora 29<\/a><\/p>\n\n\n\n Configure Nagios Availability Monitoring on AlienVault USM\/OSSIM<\/a><\/p>\n\n\n\nInstalling Nagios Plugins on CentOS 8<\/h2>\n\n\n\n
\n
Building Nagios Plugins from the Source on CentOS 8<\/h3>\n\n\n\n
Install Required Build Tools and Dependencies<\/h4>\n\n\n\n
dnf install gcc glibc glibc-common make gettext automake autoconf wget openssl-devel<\/code><\/pre>\n\n\n\n
Download Nagios Plugins Source Code<\/h4>\n\n\n\n
wget https:\/\/nagios-plugins.org\/download\/nagios-plugins-2.2.1.tar.gz<\/code><\/pre>\n\n\n\n
Extract Nagios Plugins<\/h4>\n\n\n\n
tar xzf nagios-plugins-2.2.1.tar.gz<\/code><\/pre>\n\n\n\n
Configure Nagios Plugins<\/h4>\n\n\n\n
cd nagios-plugins-2.2.1<\/code><\/pre>\n\n\n\n
.\/configure --with-nagios-user=nagios --with-nagios-group=nagios<\/code><\/pre>\n\n\n\n
Compile Nagios Plugins on CentOS 8<\/h4>\n\n\n\n
getent passwd nagios<\/code><\/pre>\n\n\n\n
nagios:x:974:974::\/var\/spool\/nagios:\/sbin\/nologin<\/code><\/pre>\n\n\n\n
make<\/code><\/pre>\n\n\n\n
Install Nagios Plugins<\/h4>\n\n\n\n
make install<\/code><\/pre>\n\n\n\n
\/usr\/local\/nagios\/libexec\/<\/code> directory.<\/p>\n\n\n\n
ls \/usr\/local\/nagios\/libexec\/<\/code><\/pre>\n\n\n\n
check_apt check_disk check_hpjd check_ircd check_nagios check_nwstat check_rpc check_ssmtp check_users\ncheck_breeze check_disk_smb check_http check_jabber check_nntp check_oracle check_sensors check_swap check_wave\ncheck_by_ssh check_dns check_icmp check_load check_nntps check_overcr check_simap check_tcp negate\ncheck_clamd check_dummy check_ide_smart check_log check_nt check_ping check_smtp check_time urlize\ncheck_cluster check_file_age check_ifoperstatus check_mailq check_ntp check_pop check_snmp check_udp utils.pm\ncheck_dhcp check_flexlm check_ifstatus check_mrtg check_ntp_peer check_procs check_spop check_ups utils.sh\ncheck_dig check_ftp check_imap check_mrtgtraf check_ntp_time check_real check_ssh check_uptime\n<\/code><\/pre>\n\n\n\n
Restart Nagios Core service<\/h4>\n\n\n\n
systemctl restart nagios<\/code><\/pre>\n\n\n\n
<\/a><\/figure>\n\n\n\n
<\/a><\/figure>\n\n\n\n
Install Nagios Plugins from EPEL Repository<\/h3>\n\n\n\n
dnf install epel-release<\/code><\/pre>\n\n\n\n
dnf search nagios-plugins-*<\/code><\/pre>\n\n\n\n
nagios-plugins-nt.x86_64 : Nagios Plugin - check_nt\nnagios-plugins-dns.x86_64 : Nagios Plugin - check_dns\nnagios-plugins-all.x86_64 : Nagios Plugins - All plugins\nnagios-plugins-apt.x86_64 : Nagios Plugin - check_apt\nnagios-plugins-dbi.x86_64 : Nagios Plugin - check_dbi\nnagios-plugins-dig.x86_64 : Nagios Plugin - check_dig\nnagios-plugins-dns.x86_64 : Nagios Plugin - check_dns\nnagios-plugins-fts.noarch : Nagios probes to be run remotely against FTS3 machines\nnagios-plugins-log.x86_64 : Nagios Plugin - check_log\nnagios-plugins-ntp.x86_64 : Nagios Plugin - check_ntp\nnagios-plugins-rpc.x86_64 : Nagios Plugin - check_rpc\nnagios-plugins-ssh.x86_64 : Nagios Plugin - check_ssh\nnagios-plugins-tcp.x86_64 : Nagios Plugin - check_tcp\n...\n<\/code><\/pre>\n\n\n\n
dnf list nagios-plugins-*<\/code><\/pre>\n\n\n\n
dnf install nagios-plugins-{load,http,users,procs,disk,swap,nrpe,uptime,dns}<\/code><\/pre>\n\n\n\n
\/usr\/lib64\/nagios\/plugins\/<\/strong><\/code>.<\/p>\n\n\n\n
ls -1 \/usr\/lib64\/nagios\/plugins\/<\/code><\/pre>\n\n\n\n
check_disk\ncheck_dns\ncheck_http\ncheck_load\ncheck_nrpe\ncheck_procs\ncheck_swap\ncheck_uptime\ncheck_users\neventhandlers\nnegate\nurlize\nutils.sh\n<\/code><\/pre>\n\n\n\n