Created
February 24, 2017 14:06
-
-
Save dobrivoje/97039f3aea846cd3a7487c644653dde2 to your computer and use it in GitHub Desktop.
Ubuntu Linux - Nagios Nagios Setup - Part 1
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
sudo apt-get update | |
sudo apt-get install build-essential libgd2-xpm-dev openssl libssl-dev xinetd apache2-utils unzip | |
sudo useradd nagios | |
sudo groupadd nagcmd | |
sudo usermod -a -G nagcmd nagios | |
apt-get update | |
apt-get install build-essential libgd2-xpm-dev openssl libssl-dev xinetd apache2-utils unzip | |
cd /tmp/ | |
tar xvf nagios-plugins-2.1.1.tar.gz | |
cd nagios-plugins-2.1.1/ | |
./configure --with-nagios-user=nagios --with-nagios-group=nagios --with-openssl | |
make | |
make install | |
cd .. | |
wget https://vorboss.dl.sourceforge.net/project/nagios/nrpe-2.x/nrpe-2.15/nrpe-2.15.tar.gz | |
tar xvf nrpe-2.15.tar.gz | |
cd nrpe-2.15/ | |
./configure --enable-command-args --with-nagios-user=nagios --with-nagios-group=nagios --with-ssl=/usr/bin/openssl --with-ssl-lib=/usr/lib/x86_64-linux-gnu | |
make all | |
make install | |
make install-xinetd | |
make install-daemon-config | |
service xinetd restart | |
service xinetd stop | |
service xinetd status | |
service xinetd start | |
service xinetd status | |
# check if memory command works : | |
/usr/local/nagios/libexec/mem_check.py -W 50 -C 87 | |
#if no, download it : | |
apt-get install python-psutil | |
#if experiencing problems: | |
sudo dpkg --configure –a | |
apt-get update | |
apt-get install python-psutil | |
#check if mem_check.py exists, if no find it on the internet | |
# try it : | |
/usr/local/nagios/libexec/mem_check.py -W 60 -C 70 | |
#if not works, set appropriate permissions : | |
ls -al /usr/local/nagios/libexec/mem_check.py | |
chmod 775 /usr/local/nagios/libexec/mem_check.py | |
#try it again : | |
/usr/local/nagios/libexec/mem_check.py -W 60 -C 70 | |
/etc/init.d/xinetd restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment