I keep hearing about Nagios, a really powerful tool for monitoring servers. How do I install it?
First of all, I'm assuming that you're doing this on a stock, brand-spanking new install of 12.04. Nothing special happening here.
It will go through, and ask you about what mail server you want to use:
Pick one based upon your needs.
It will then ask you about the domain name you want to have email sent from. Again, fill that out based upon your needs.
It will ask you what password you want to use - put in a secure password. This is for the admin account
And then you'll need to verify your password.
Once the install is all done, you can head over to
Once you've done that, you're in!
Little ugly, huh?
Nagios automatically adds in the 'localhost' to the config, and does load, current users, disk space, http and ssh checks.
Now there is one more thing we need to do before nagios is all ready - we need to have it accept external commands so we can acknowledge problems, add comments, etc.
To do that, we need to edit a few files. Start by opening
Now, restart apache by running
Not done yet! We need to edit
Change it to
Save and close this file.
Now, we need to edit the
And then (because of how permissions work) we need to edit the permissions of the directory above that with:
Now, restart nagios with:
If you use Apache as your web server, restart that also:
And you should be good to go! Happy monitoring!
To have alerts emailed to you, see this question and answer.
This howto on Linode.com is very detailed, and works with Nagios 3:
and here's a nice summary of how to monitor a website using Nagios 3:
and here is another good example of configuring both Nagios and Apache, and configuring escalations:
I recommend follow Nagios official Quickstart guide, which does not use apt-get, but download the source code, compile and then install.
This would ensure your Nagios is installed at /usr/local/nagios/
I find the advantage that Nagios installed at /usr/local/nagios/ when I try to install Nagios Service Check Acceptor, a add-on for Nagios.
protected by Community♦ Sep 24 '12 at 11:02
Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.
Would you like to answer one of these unanswered questions instead?