Nagios – Web-Based Server Monitoring Software
Is your Linux server down?
This one question has the power to keep us all up at night. Linux servers host your websites, handle your email, and manage your network. Your Linux server is the heart and soul of an online presence, since your databases and web applications all run on top of your server. Put simply, if your server is down, so is your business. Downtime means lost sales, and lost customers (present and future revenue). If you can’t afford downtime, you need a good server monitoring program. One such software solution is called Nagios, and it’s quite powerful.
Although Nagios isn’t the easiest web-based software solution to install (most of the server configuration is done by editing configuration files), it is extremely easy to use, once configured. Nagios presents you with a web-based status screen, which allows you to quickly view the status of all of the servers that you are monitoring. Nagios isn’t for just Linux servers either, Windows servers can be added to monitor as well. Once you are logged into Nagios, you can view the detailed status for all of the monitored servers by clicking on the “Service Detail” link.
From here, you can view the detailed information about when Nagios last checked the status of a service running on your server, and view the results of that last check. Pretty boring stuff so far, since nothing is broken. Let’s break the POP3 service on our server, and see how Nagios reacts. Within one minute, Nagios has flagged the POP3 service as being in a “critical” state. Nagios requires four failed connection attempts (by default), before an alert is issued. This is important, since sometimes a request is dropped by a router in between Nagios and the destination server. The Internet is a crazy place, and sometimes traffic isn’t delivered to it’s destination in time. Therefore, Nagios will wait for four consecutive failures, before it issues an alert.
Once Nagios has failed to connect to the server four consecutive times, the server is then placed into an alert status. From here, depending on your Nagios configuration, an email can be sent, a text message sent, or even a sound played through speakers connected to your Linux server.
Once we have successfully fixed the issue with the POP3 daemon on our Linux server, Nagios will remove the critical warning on the server, and place the server into an “OK” state. Once the monitored server’s status is changed to “OK”, emails and SMS text messages are once again sent, to inform everyone that the monitored server is fixed.
In addition, the host status on Nagios is now displayed as “OK” on the service status page.
In addition to monitoring, Nagios also supports the ability to create logs and uptime graphs which display host uptime and service stability in an easy to read format. Host state breakdown reports allow you to easily view and export server and service uptime reports.
In addition, you can also schedule downtime with Nagios, so that alerts aren’t issued when a service or server is taken down for routine maintenance. The downtime window is completely custom, and Nagios gives a summary of all planned downtime, by clicking on “Downtime”, on the navigational bar.
In the end, Nagios has the potential to save you both time and money. With Nagios, you won’t have to worry about whether or not your server is working- Nagios will let you know as soon as your server is unavailable.
Christopher Pace is a linux consultant who offers a variety of linux consulting services to clients. Linux administration services are offered remotely, which helps his clients save both money and time!