Azimout's Linux weblog


with 2 comments

Here’s how you can set up a Nagios server in order to monitor a publicly accessible website and get an email notification when it’s down.

On the monitoring server:

Now create a .cfg file under /etc/nagios3/conf.d with the following contents:

define host {
        use             generic-host
        host_name       xxx
        alias           xxx
        address         xxx
define service {
        use             generic-service
        host_name       xxx
        service_description     HTTP
        check_command   check_http

(replace all instances of xxx with the appropriate values)

Now restart Nagios: sudo service nagios3 restart

Any notifications will be emailed to root@localhost



Written by azimout

22/09/2013 at 20:06

Posted in Howto

2 Responses

Subscribe to comments with RSS.

  1. Why Nagios and not Icinga? 🙂

    Danilo (@dbrgn)

    22/09/2013 at 22:53

    • That is a very good question, Danilo. I actually didn’t know about Icinga. It looks more advanced than Nagios, and backwards compatible at the same time! If I have a moment maybe I’ll give it a try… Thanks for the suggestion!


      23/09/2013 at 14:29

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: