Check if server is down using ping and send an SMS if not

This guide explains how you can setup the alarm system to ping your email server periodically to see if it is operational. If the alarm system detects downtime it will send an SMS to your mobile. This article shows tutorial steps and the necessary information to help you create this setup efficiently. We will use Ozeki Alarm System. It is a useful server monitoring sms sender tool that makes it possible to to send alarm SMS notifications in various environments. In this example we use it to notify users when an email server is down via SMS. This guide requires basic knowledge of email and SMS technology. You will be provided some important information and detailed step by step instructions. We hope you will find the presented insights beneficial. Let's get started!

What is a mobile monitoring?

The mobile monitoring is an Android Mobile Phone app that does email server monitoring. You need to install the Ozeki Alarm App on this Android phone and configure the email server to watch. If the email server goes down, this mobile app will send an sms to your mobile phone.

What is a monitoring pc ?

Since Ozeki Alarm runs on both Android Mobile phones and Desktop PC-s, you can use a Monintoring PC instead of a mobile Monitoring app. The monitoring PC is computer that does email server monitoring. You need to install the Ozeki Alarm App on this computer, and configure the email server to watch. If the email server goes down, this pc will send the sms to your mobile. You can connect the monitoring pc to the mobile network in various ways.

What is an sms alert?

SMS alerts, also known as SMS notifications or text alerts, are messages sent automatically to the configured recipients, indicating if the e-mail server is experiencing downtime. Employing a text alert system enables businesses to send these alerts to large groups of people simultaneously.

How do I check if my email server is down (Easy guidelines)

To check if my email server is down:

  1. Install the Ozeki Alarm App on Android
  2. Login to the Ozeki Alarm App from your PC
  3. Install Ping offline source
  4. Configure the SMS notification channel
  5. Go to the Configure tab page's Advanced tab
  6. Tick all the check boxes in Log level group box
  7. Create a new routing rule
  8. Test the system

What is server monitoring SMS?

Server monitoring SMS is an alert SMS message sent when server issues are detected.

How does the system work

Ozeki Alarm System allows users to send an SMS automatically, if the email server is down. It performs pings periodically to detect downtime (The default time period is 5 minutes). You can configure the alarm to send text messages automatically if it detects that the e-mail server is not working. This is incredibly helpful in notifying the users of the email sever if this happens.

What is an email server?

An email server is an application or computer in a network whose purpose is to act as a virtual post office. The server stores incoming mail for distribution to local users and sends out outgoing messages. This uses a client-server application model to send and receive messages using Simple Mail Transfer Protocol (SMTP). Your business very likely operates an e-mail server, and the purpose of this solution, is to alert you if your email server goes offline.

Methods of email server monitoring

This solution offers two ways of monitoring your email server. Monitoring can be done through mobile or PC using periodic pings. Notification is performed using SMS alerts in both cases. You may use the desktop or mobile application to operate Ozeki Alarm System. Both options feature the same tools, making the choice come down to user preference.

How to check if server is down using ping and send an SMS if not (video tutorial)

This video tutorial will show you how you can monitor your email server, as well es how to configure text messages to be sent automatically if it goes offline. In this video we install an SMPP Client and a Ping offline alarm. We make these solutions interact with eachpther via routing. When the alarm detects downtime, it triggers a message to be sent using the SMPP client.

Server down using Mobile Monitoring ping SMS alert

This down detector system works in a way that it constantly monitors your email server. Your monitoring mobile pings your e-mail server (Figure 1) every 5 minutes (Or the amount of minutes you set the frequency to). If the ping doesn't get a response in time, the alarm system detects that the server is not working. When this happens, the Ozeki Alarm software sends an SMS alert to your mobile device. This text message contains information that your email server is down.

server down using mobile monitoring ping sms alert
Figure 1 - Server down using Mobile Monitoring ping SMS alert

Server down using PC Monitoring ping SMS alert

The PC variant of this system works the same way as the mobile version. Your monitoring PC pings your e-mail server (Figure 1) every 5 minutes (Or the amount of minutes you set the frequency to). If the ping doesn't get a response in time, the alarm system detects that the server is not working. When this happens, the Ozeki Alarm software sends an SMS alert to your mobile device. This text message contains information that your email server is down.

server down using pc monitoring ping sms alert
Figure 2 - Server down using PC Monitoring ping SMS alert

Open Alarm System application

To open the Alarm System application you need to be on the Ozeki desktop. Simply click on the icon labeled "Alarm System", which is located on the top left of the screen below My Account (Figure 3). This will bring up the Alarm System window, where you can configure a vareity of settings related to the Alarm System.

open alarm system application
Figure 3 - Open Alarm System application

Add SMS connection

Inside the Alarm System window you are able to add sms connections. First, click on the Channels tab in the toolbar on top (Figure 4). This will bring up a list of notification channels which you can install. Click on Install highlighted in blue next to SMS Connection to begin the installation. This will forward you to another page where you can select the type connection you need.

add sms connection
Figure 4 - Add SMS connection

Install SMPP client

In order to use this alarm we need to install an SMPP client (Short Message Peer to Peer). Do this by clicking on Install highlighted in blue next to SMPP client (Figure 5). This will forward you to a configurations page where you can set up the details of your connection.

install smpp client
Figure 5 - Install SMPP client

Configure SMPP client

Configure the SMPP client by entering your details in the corresponding textboxes (Figure 6). First we need to connect to the server. Enter the IP address of the server into the first textbox, then the Port into the second textbox below. You also need to enter the Username and the Password for your server into the following two textboxes. Finally, enter the telephone number of this connection into the last textbox.

configure smpp client
Figure 6 - Configure SMPP client

Enable logging

Next, we need to enable logging. First, scroll up and switch over to the Advnced tab by clicking on it. In this tab click on Log Level. In the Log Level settings, enable every option by clicking on the checkboxes next to them (Figure 7). Click on the blue Ok button on the bottom to continue.

enable logging
Figure 7 - Enable logging

Connect SMPP client

Next, we need to connect to our newly created SMPP client. After you created it, click on the sliding connection button in the menu on the left (Figure 8). When the button turns green, you are now connected to the SMPP client. Once you are connected you need to add a new alarm source.

connect smpp client
Figure 8 - Connect SMPP client

Install Ping offline source

Start by clicking on the Home button in the toolbar on the top. Here you can see an "alarm sources" menu on the right. Inside this menu, click on "Add new source" highlighted in blue. You may also navigate here by clicking on the Sources button on the top (Figure 9). In the "Install alarm source" tab, find the Ping offline alarm. Click on the Install button highlighted in blue next to it to install this solution.

install ping offline source
Figure 9 - Install Ping offline source

Configure host

After you clicked install on Ping offline, you need to configure it. Enter the IP address of the server you wish to monitor into the first textbox next to Host (Figure 10). Then, enter the amount of minutes you wish your server to be monitored at into the second textbox next to Period. This frequency means, that the alarm will ping your server every so many minutes that you entered here.

configure host
Figure 10 - Configure host

Enable ping

Next, we need to connect to our newly created Ping. After you created it, click on the sliding connection button in the menu on the left (Figure 10). When the button turns green, you are now connected to the Ping offline. Once you are connected you need to add a new routing rule.

enable ping
Figure 11 - Enable ping

Add routing rule

Now we only need to add a routing rule to configure where the alarm messages are sent. First click on the Routes button on the top (Figure 12). Find the Route details menu on the right. Select ping_offline_1@localhost in the first combobox next to "From:". Then, select SMPP_client_1@localhost in the second combobox next to "To:".

add routing rule
Figure 12 - Add routing rule

Enter recipient address

Now we need to enter the phone number of who recieves the message. In the Route details menu, click on the Modify tab (Figure 13). In this tab, enter the phone number of the recipient into the textbox that reads "To:". Click on the blue OK button on the bottom of the tab to save it.

provide recipient address
Figure 13 - Provide recipient address

Send alarm when host is offline

By going back to the details of the Ping offline alert we can click on the Events tab to view every action of the alarm. In the event log we can see that it sends an alarm when the host is offline (Figure 14). This will also trigger an alarm sms to be sent, because it is routed to the SMPP client.

send alarm when host offline
Figure 14 - Send alarm when host offline

Alarm SMS sent

Finally by going back to the SMPP client details, we can see how Ping offline interacts with it. An alarm triggers a message to be sent. These actions can be viewd in the Events tab. Here, int the event log, we can see that a text message (SMS) was sent to the configured recipient (Figure 15).

alarm sms sent
Figure 15 - Alarm SMS sent

Summary

In this article, we showed you how you can develop a system that send an SMS message if a predestined server is down. Having such a system will make it possible to have more control over your servers. It will make the downtime shorter so your service will be more reliable.

To know more about this system, feel free to visit the Ozeki webpage. There you will find some articles about more systems that will supervise your servers. Check the article about how you can build a system that send an SMS when your webserver is down, or how to build a system that checks you server with a ping and sends a VoIP call if it is down.

To create such a system, start with downloading the Ozeki Alarm System and configure you alarm sources.