Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Install Nagios Core On CentOS 7
1. Nagios Core
Author : Sharad Kumar Chhetri
Date : 30-March-2015
Blog : http://sharadchhetri.com
1.Install Nagios Core by using source code on
CentOS 7 Server
2.Install Nagios Plugins
3.Install NRPE and configure
2. Install Nagios Core by using source code on
CentOS 7 Server
Installation steps of Nagios Core Server on CentOS 7
yum install wget
useradd nagios
groupadd nagcmd
usermod -a -G nagcmd nagios
yum install httpd php gd gd-devel gcc glibc glibc-common openssl perl perl-devel make
wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-4.0.8.tar.gz
tar -xvzf nagios-4.0.8.tar.gz
cd nagios-4.0.8
./configure --with-command-group=nagcmd
make all
make install
make install-init
make install-config
make install-commandmode
make install-webconf
cp -rvf contrib/eventhandlers/ /usr/local/nagios/libexec/
chown -R nagios:nagios /usr/local/nagios/libexec/eventhandlers
htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
systemctl start httpd.service
systemctl start nagios.service
3. Install Nagios Plugins
Installing Nagios Plugin from source code
Install NRPE and configure
wget http://www.nagios-plugins.org/download/nagios-plugins-2.0.3.tar.gz
tar -xvzf nagios-plugins-2.0.3.tar.gz
cd nagios-plugins-2.0.3
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make && make install
wget http://sourceforge.net/projects/nagios/files/nrpe-2.x/nrpe-2.14/nrpe-2.14.tar.gz
tar -xvzf nrpe-2.14.tar.gz
cd nrpe-2.14
./configure && make && make install
mkdir /usr/local/nagios/etc
cp sample-config/nrpe.cfg /usr/local/nagios/etc
yum install xinetd
cd nrpe-2.14
make install-xinetd
## Editing /etc/xinetd.d/nrpe
vi /etc/xinetd.d/nrpe
only_from = 127.0.0.1 x.x.x.x
## Editing /etc/services
vi /etc/services
nrpe 5666/tcp
systemctl restart xinetd
4. Editing commands.cfg file for enabling use of check_nrpe
URLs for Learning
Nagios Project Website :
http://www.nagios.org/
Nagios Plugin and NRPE Installation :
http://assets.nagios.com/downloads/nagiosxi/docs/How-To-Configure-NRPE-and-Install-From-Source-
with-Nagios-XI.pdf
vi /etc/nagios/objects/commands.cfg
define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
}
Save and Exit
systemctl restart nagios