Webserver down: send email

Having a professional solution in server status checking is vital in managing webpages. This article offers an insight into Ozeki Alarm System, which sends an alert in e-mail if the webpage is not accessible or the webpage's content has changed. This tool not only checks the condition of a website, but notifies the owner if something goes wrong, making the monitoring easier. After reading this guide, you will be able to setup Ozeki Alarm System to monitor your website and you will be able to receive alarm notifications if there is a problem with it.

What is email alert

Email alert is a form of notification you receive when your webserver is down. This notification message contains the monitored website address, the timestamp of the problem, and the description of the problem. This is probably the easiest way to receive these reports because you only need an email address.

Check your server and send an Email if it is down (Quick steps)

To check your server using periodic webpage download:

  1. Launch Ozeki SMS Gateway
  2. Add new Web server down source
  3. Configure the alarm source
  4. Enable Web server down connection
  5. Set up E-mail client connection channel
  6. Add new SMTP client
  7. Configure the SMTP server
  8. Create new Route for the connection
  9. Simulte a website error
  10. Check the logs of the alarm system
  11. View the sent alarm e-mail

Setting up the Alarm System (video tutorial)

This video shows how to set up the Alarm System. You will see the steps of registering your website and your email address. You will see how to setup the system to check and notify yourself about your server's status. After finishing this short tutorial, you will know how to use the Ozeki Alarm System. It takes only 3 minutes of your time, but the benefit is clear: getting a working website monitoring system up and running.

How the e-mail notification system works (using a mobile phone)

The webserver down e-mail system will make sure that you get notification when you webserver is suffering from an error. The system consists of a mobile phone running the Ozeki Alarm System, a server that needs monitoring and an inbox where the notification message will be sent. The system works the following way: The monitoring mobile will send response requests to the server periodically. If the server is down, it will not respond to the request. The Alarm Source will detect it and will send a notification e-mail to the predefined e-mail address.

webserver down using mobile monitoring ping email alert
Figure 1 - Webserver down using Mobile Monitoring ping E-mail alert

How the e-mail notification system works (using a PC)

This server monitoring system will provide full time supervision of a selected server. The system consists of a PC that is tunning the Ozeki Alarm System, a server that is checked periodically and an e-mail inbox that will receive the message in case of an error. The Alarm System on the PC will send a download request periodically. If the serve is not responding to the request, the alarm system will know that it is offline. In this case, an e-mail will be sent to the recipients inbox.

webserver down using pc monitoring ping email alert
Figure 2 - Webserver down using PC Monitoring ping E-mail alert

Adding a new web server source

The first step in creating this website monitoring solution is adding a new web server source in Ozeki Alarm. You can do this by chosing the 'Sources' icon in the toolbox. Next find the infrastructure monitoring section where you have to click the 'Web server offline' item. This takes you to the next step in setting up the connection. (Figure 3)

add new web server down source
Figure 3 - Add new web server down source

How to configure the new web server

In the Install alarm source list, you can find options to configure your web server. In order to register your webpage, you have to write it's URL in the 'URL:' textbox. In our example we put "http://www.mywebpage.com" into this field (Figure 4).

In addition to the webserver URL, you need to specify a text that appears on your website. If your website returns an error Ozeki Alarm will not find this text in the downloaded content, and will know that an alarm is needed. You can specify the text which shows that the server is working well in the 'Text to look for:' textbox and you can add the text which will trigger the notification process in the 'Text of error:' textbox. If you do this, you will be alerted when your webserver gives an error message or the content is modified by someone without permission, so you will know that something has to be done.

configure web server
Figure 4 - Configure web server

Enable the connection

If you want to enable the connection between the Alarm System and your webpage, you have to make sure that the 'Connection' switch button is "clicked in" in the control table. You can find it in the left side of the Web server offline details page. Without doing this, Ozeki Alarm will not monitor your webpage, so pay attention to this step. (Figure 5)

enable web server down connection
Figure 5 - Enable web server down connection

Adding a new E-mail client

To be able to send an email message when the website is not accessible, you need an email client. An email client is a software module, that is responsible for delivering email messages to the email network.

In order to add a new E-mail client, you have to choose the 'Connections' icon in the Toolbar. After you have opened the 'Connections' page, you will see the Install notification channel list. You have to select the 'E-mail client connection' item. This gives you the chance to set up an e-mail network connection. To be able to use the alerting fuction, you have to install a notification channel. (Figure 6)

add new email client channel
Figure 6 - Add new E-mail client channel

Add SMTP client

There are four email client types available. For sending emails the SMTP client is the best option. To add a SMTP client, you have to choose the 'SMTP client' item in the E-mail clients list (top of the list, highlighted in Figure 7). SMTP is an internet protocol for e-mail transmission, so selecting this option will allow you to send e-mails through this connection.

add smtp client
Figure 7 - Add SMTP client

Configure SMTP client

To configure the SMTP client, you have to look for the 'From' groupbox, where you have to provide the sender's name ('From name:') and e-mail address ('From email:'). Next, in the SMTP Server groupbox, specify the SMTP server details. Set the Host address, number of ports, type of SMTP Security and Authentication, username and password. (Figure 8) By specifying these options, you can make sure that the client is configured and ready to use.

configure smtp client
Figure 8 - Configure SMTP client

Provide the recipient address and enable logging

Switching to the Advanced tab, you have to give the receiver's name and E-mail address in the 'To' groupbox. You can increase the log level to see what happens on the connection by checking the 'Log communication events', 'Log messaging events' and 'Attach log to every message' checkboxes. These extra details provide valuable information about what happens during the communication. (Figure 9)

provide recipient address and enable logging
Figure 9 - Provide recipient address and enable logging

Add new routing rule

A routing rule is need to forward alert messages from the alarm source to the email client. Adding a new routing rule is simple: in the Toolbar find the 'Routes' icon. By clicking on it you can open the Routes page. In this page you can find the 'Create new Route' icon right under the Toolbar. After clicking it, you will see the settings, where you can specify the message route in the 'Settings' groupbox. Pay attention to this because this route will be used when it comes to alerting you about your server. When you create a route, you need to specify the source of the alarm message and the destination, where it should be routed to. Select "web_server_offline_1" as the source using the 'From' combo box. Select "SMPT_client_1" as the destination using the 'To' combo box. Click OK to finalize your settings. (Figure 10)

add new routing rule
Figure 10 - Add new routing rule

Send alert when the web server is down or the content does not match

Now that all the neccessary configurations are set, you can test the system. Shut down your website, or disconnect the network link to simulate an error. When the alarm system detects the error, it will record a corresponding log entry. You can find this log entry in the 'Events' tab, where you are alerted when the server is not working properly. You can refresh and delete the Log with the proper icons, they are in the top right hand corner. It is advised to study the Log in order to fully understand the ongoing process. (Figure 11)

send alert when the web server down
Figure 11 - Send alert when the web server down

E-mail alert received

After checking your Inbox, you will see that the Alarm System sent you a message based on the configurations and event log. Check your Inbox frequently, so you will not miss any update from the Alarm System. (Figure 12)

email alert received
Figure 12 - E-mail alert received


By finishing this guide, you had the opportunity to take a look at Ozeki Alarm System and on this alerting technique. If your organization manages webservers, you have to be sure that they are never down or attacked, or at least it is not visible for the customers.

The solution present above is a great tool alerting you when something is out of order. If your server happens to be down, you get an alert in e-mail and you can start working on it as fast as you can.

Make sure that you don't finish your work here and gather more information about this topic. You can learn more about this subject: Checking webserver with SMS alerting and Email server chat alert.

Now it is time to download the Ozeki Alarm System.