Last active
August 29, 2015 14:14
-
-
Save bmangesh/00b8a91bd90c9af66292 to your computer and use it in GitHub Desktop.
Automated Installation of NAGIOS_NRPE Plugins ON CLIENT SIDE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
#Author : MANGESHKUMAR B. BHARSAKLE | |
#Date : 26,27 JAN 2015 | |
yum install -y gcc glibc glibc-common gd gd-devel make net-snmp openssl-devel | |
useradd nagios | |
cd /tmp/ | |
wget https://www.nagios-plugins.org/download/nagios-plugins-1.5.tar.gz | |
tar -xvf nagios-plugins-1.5.tar.gz | |
cd nagios-plugins-1.5 | |
./configure | |
make | |
make install | |
yum install -y xinetd | |
################################################################################### | |
cd /tmp/ | |
wget http://garr.dl.sourceforge.net/project/nagios/nrpe-2.x/nrpe-2.15/nrpe-2.15.tar.gz | |
tar xzf nrpe-2.15.tar.gz | |
cd nrpe-2.15 | |
./configure | |
make all | |
make install-plugin | |
make install-daemon | |
make install-daemon-config | |
make install-xinetd | |
read -p " Please Enter Nagios Monitoring Server IP : " ip_address | |
# echo " only_from = 127.0.0.1 localhost $ip_address " >> /etc/xinetd.d/nrpe | |
sed -i "s/only_from = 127.0.0.1/only_from = 127.0.0.1 $ip_address/g" /etc/xinetd.d/nrpe | |
echo " nrpe 5666/tcp #NRPE " >> /etc/services | |
service xinetd restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment