Nagios

Nagios offers complete monitoring and alerting for servers, switches, applications, and services.

Prerequisites
Decide which web server you want to use and set it up:
 * Apache with PHP
 * Lighttpd with PHP

net-analyzer/nagios
Set the right USE flag for :

Also enable the right USE flags for the plugins you want for.

Finally install :

Apache
Enable the Nagios module for Apache:

Since Nagios requires PHP for its web interface, you may have to enable it as well if you haven't done so already. One way is to simply add  to   and edit. This should be fine unless you need PHP for purposes other than hosting Nagios on the host you configure it.

If you are using Apache 2.4 (which is still marked unstable as of June 2013) you may have to modify  to fit the new authorization directives of Apache 2.4.

Remember to add the  user to group  :

Finally, restart the Apache service:

Lighttpd
Enable the Nagios config for Lighttpd:

Configure athentication, more option on how to set this up can be found in the Lighttpd docs

Restart the Lighttpd service:

Permissions
Add the user name(s) to the nagios group, whom are allowed access to the Nagios service:

Once done, completely log-out from all shells and relogin for the update to apply.

Boot service
You can now start Nagios:

To start Nagios at boot time, add it your default runlevel:

Testing
Open your browser and navigate to "http://localhost/nagios".

More resources

 * Gentoo system monitoring with Nagios