Wednesday, June 11, 2014

Setup Nagios on Ubuntu 12.10

sudo apt-get update
sudo apt-get install nagios3 nagios-nrpe-plugin

If you have other web pages or apps running on the same server, the following information might be useful to separate Nagios as it's own Apache virtual host on a non-standard port (for example 43326 here).

Remove standard config and create Apache virtual host;

sudo cp /etc/apache2/conf.d/nagios.conf /etc/apache2/sites-available/nagio  s3  sudo rm /etc/apache2/conf.d/nagios.conf  sudo vi /etc/apache2/sites-available/nagios3  

To beginning of file add;

Listen 43326  <VirtualHost *:43326>      ServerAdmin webmaster@localhost      DocumentRoot /var/www/nagios3  

To the end of the file add;

</VirtualHost>  

Enable the new site;

sudo a2ensite nagios3  

If you run a firewall (UFW), open the port;

sudo ufw allow 43326  

Restart Apache

sudo service apache2 restart

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.