Cool Web-based Software- Nagios

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.

Nagios host status details

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.

Nagios host details- critical alert

Critical 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.

Nagios email alert

Nagios email alert

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.

Nagios SMS Alert

Nagios SMS Text Message Alert

In addition, the host status on Nagios is now displayed as “OK” on the service status page.

Nagios Host Status OK

Nagios Host Status OK

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.

Nagios Host State Breakdown Report

Nagios Host State Breakdown Report

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.

Nagios Scheduled Downtime

Nagios Scheduled Downtime

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.

Tags: ,

5 Responses to “Cool Web-based Software- Nagios”

  1. [...] is down on the server). Here is a link to a blog post that I wrote this weekend about Nagios: Cool Web Based Software: Nagios __________________ I am a Linux consultant, who offers Linux consulting services and Linux [...]

  2. djack says:

    hallo cristopher..
    i have queation : what applications you use to send nagios alert via SMS? and could you tell me installation process and configuration on nagios…

    thank you before…

  3. cpace says:

    The easiest way is to send an email to a SMS mailbox address (such as 406xxxxxxx@vtext.com for Verizon).

    Thanks for the comment!

  4. djack says:

    sorry, more details please.. :(

    1. do you have url tutorial to configure nagios with notify SMS alert?
    2. how to define OK state?

    thanks.. :)

  5. I used to be suggested this blog via my cousin. I am now not positive whether or not this publish is written by way of him as no one else know such detailed approximately my problem. You are incredible! Thank you!

Leave a Reply