wiki:nagios

SeeAlso?: https://www.digitalocean.com/community/tutorials/how-to-install-nagios-4-and-monitor-your-servers-on-ubuntu-16-04

   13  sudo useradd nagios
   14  sudo groupadd nagcmd
   15  sudo usermod -a -G nagcmd nagios
   16  sudo apt-get update
   17  sudo apt-get install build-essential libgd2-xpm-dev openssl libssl-dev unzip
   18  sudo apt-get install postfix
   19  curl -L -O https://assets.nagios.com/downloads/nagioscore/releases/nagios-4.3.4.tar.gz
   20  tar zxf nagios-*.tar.gz
   21  cd nagios-4.3.4/
   22  ./configure --with-nagios-group=nagios --with-command-group=nagcmd --with-mail=/usr/sbin/sendmail
   23  make all
   25  sudo apt-get install apache2
   26  sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql
   27  sudo make install
   28  sudo make install-commandmode
   29  sudo make install-config
   30  sudo usermod -G nagcmd www-data
   31  sudo a2enmod rewrite
   32  sudo a2enmod cgi
   33  sudo htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
   34  ls /etc/apache2/sites-available/
   35  sudo /usr/bin/install -c -m 644 sample-config/httpd.conf /etc/apache2/sites-available/nagios.conf
   36  sudo a2ensite nagios
   37  sudo service apache restart
   38  sudo service apache2 restart
   39  sudo vi /etc/systemd/system/nagios.service
   40  sudo systemctl enable /etc/systemd/system/nagios.service
   41  sudo service nagios start

Installing plugins

   48  curl -L -O http://nagios-plugins.org/download/nagios-plugins-2.2.1.tar.gz
   49  tar zxf nagios-plugins-*.tar.gz
   50  cd nagios-plugins-*
   51  ./configure --with-nagios-user=nagios --with-nagios-group=nagios --with-openssl
   52  make
   53  sudo make install

Authorization in web interface

sudo htpasswd -c /usr/local/nagios/etc/htpasswd.users joerg
sudo vi /usr/local/nagios/etc/cgi.cfg
Last modified 3 months ago Last modified on May 14, 2018, 7:37:06 AM