Nrpe install

sudo su

cd /home/ec2-user/

mkdir downloads

cd downloads

wget http://sourceforge.net/projects/nagios/files/nrpe-2.x/nrpe-2.13/nrpe-2.13.tar.gz/download?use_mirror=jaist

tar -zxvpf nrpe-2.13.tar.gz

 

groupadd nagios

useradd -d /usr/local/nagios -g nagios nagios

 

wget http://sourceforge.net/projects/nagiosplug/files/nagiosplug/1.4.16/nagios-plugins-1.4.16.tar.gz/download?use_mirror=jaist

 

tar -zxvpf nagios-plugins-1.4.16.tar.gz

 

yum install openssl-devel

 

cd nagios-plugins-1.4.16

 

./configure

 

make

make install

 

cd ../nrpe-2.13

 

./configure –help

 

./configure –enable-command-args

make all

 

cd /usr/local/nagios/

mkdir etc bin

 

cp downloads/nrpe-2.13/src/nrpe /usr/local/nagios/bin/

 

cp downloads/nrpe-2.13/sample-config/nrpe.cfg /usr/local/nagios/etc/

cp downloads/nrpe-2.13/init-script.debian /etc/init.d/nrpe

 

cd /usr/local/src/

wget -c http://cloudman.rumahweb.com/wp-content/uploads/2011/10/dpkg_1.14.31.tar.gz

tar -zxvf dpkg_1.14.31.tar.gz

cd dpkg-1.14.31/

./configure

make

cd utils

make install

export PATH=”/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/aws/bin”

 

 

chmod 777 /etc/init.d/nrpe

vi /usr/local/nagios/etc/nrpe.cfg

/etc/init.d/nrpe start

cd /home/ec2-user/downloads/nrpe-2.13/src

./check_nrpe -H localhost -c check_users

 

00 */3 * * * root /usr/bin/php /home/ec2-user/bash_script/create_ranking.php

00 00 * * * root /usr/bin/php /home/ec2-user/bash_script/renew_user_log.php

 

 

command[check_mysq_disk]=/usr/local/nagios/libexec/check_disk -w 2% -c 1% -p /data

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s