Nagios

From SysadminWiki

Nagios is an open source host, service and network monitoring program.See Either the Wikipedia Summary (http://en.wikipedia.org/wiki/Nagios) or the Product Homepage (http://www.nagios.org/) for more details. To setup a basic, but working and very simple to manage, Nagios instance in your site install the free and open source GroundWork Community Edition (http://www.groundworkopensource.com/) or download the VMware appliance of that. After an Nmap (http://nmap.org/) run vs your subnet to gather info about your network services like SSH, HTTP, FTP, .. the Nagios configuration is created and start to check these services. GroundWork Community Edition (http://www.groundworkopensource.com/) integrates with Ganglia to offer an interesting cluster monitoring tool without create a dedicated nagios SSH account on the checked host. If you have a Ganglia installation that collects info about a private network not directly reachable from you Nagios server you can import the XML data produced from Ganglia in your Nagios configuration too. On the official GroundWork site is present a video (http://www.groundworkopensource.com/resources/webcasts/grid-cluster-monitoring-ganglia.html) to describe this feature.

Monitoring Plugins

Are documented on a Separate Page.

Remote Hosts

Because Nagios runs on a central server, it can only interrogate the remote state of machines if they are somehow accessible over the network. This means that it can run any monitor on localhost but is restricted to the following for remote ones:

  • Network services (ie, check_ssh used to see if there's an sshd service on target host)
  • 'Polled' local scripts sending back over a secure pipe (NRPE)
  • 'Pushed' results of passive / active checks back to nagios server (NSCA)

Configuration Tips

  • If you already restrict access to the webserver that nagios runs under (htaccess or SSL/x509), then you can set the cgi.cfg to allow user * and it'll use $REMOTE_USER within nagios