There is a point to this story, but it has temporarily escaped my mind...
Contact Me MyFaceBook MyLinkedIn MyGitHub MyTwitter

Install Nagios Server

Nagios is an enterprise class, open source software that can be used for network and infrastructure monitoring. You can monitor servers, switches, applications and services etc. It will alert the System Administrator or other groups when something goes wrong and also alerts back when the issues have been rectified.

First, make sure that all of the latest patches are installed.

sudo apt-get update
sudo apt-get dist-upgrade
sudo reboot

Install dependencies

sudo apt-get install build-essential libgd2-xpm-dev openssl libssl-dev apache2-utils unzip snmp

Create Nagios User and Group

sudo useradd nagios
sudo groupadd nagcmd
sudo usermod -a -G nagcmd nagios
sudo usermod -G nagcmd www-data

Install Nagios Core

cd /tmp
curl -L -O https://assets.nagios.com/downloads/nagioscore/releases/nagios-4.3.4.tar.gz
 
tar xvf nagios-*.tar.gz
 
cd nagios-*
 
./configure --with-nagios-group=nagios --with-command=nagcmd
 
make all
 
sudo make install
sudo make install-commandmode
sudo make install-init
sudo make install-config
sudo /usr/bin/install -c -m 644 sample-config/httpd.conf /etc/apache2/sites-available/nagios.conf
 
chown nagios:nagcmd /usr/local/nagios/var/rw 
chown nagios:nagcmd /usr/local/nagios/var/rw/nagios.cmd

Install Nagios Plugins:

cd /tmp
curl -L -O http://nagios-plugins.org/download/nagios-plugins-2.2.1.tar.gz
 
tar xvf nagios-plugins-*.tar.gz
 
cd nagios-plugins-*
 
./configure --with-nagios-user=nagios --with-nagios-group=nagios --with-openssl
make
sudo make install

Create Web UI Admin Account

Create a nagiosadmin account fro logging into the Nagios web interface:

sudo htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin

then restart the web server software:

sudo systemctl restart apache2

Configure Nagios

Once the software is installed, you should configure Nagios to your enviornment. There are many good web sites out there that cover this. I will not cover it here specifically since every environment is different.

Copyright © 2019 by Julian Easterling. SOME RIGHTS RESERVED.
Privacy Policy              Terms of Use             


Creative Commons License
Except where otherwise noted, content on this site is
licensed under a Creative Common Attribution-Share Alike 4.0 International License.


All of the opinions expressed on this website are those of Julian Easterling and
do not represent the views of any of my current and previous clients or employers in any way.

If you notice an error on the site or content that has not been properly attributed, bring
it to my attention using the contact page and I will endeavor to fix it as soon as I can.

I accept no responsibility or liability for any damages incurred by following any of
my advice or by using any of the information on my site or of those sites that I link to.