📜 ⬆️ ⬇️

How to find out in time that your server is not working?

It happens that the sites stop working. The reasons can be very different: the channel “fell” in the data center, the server went out, someone namudil something with a database or files on the server, the system administrator unsuccessfully updated the software or transferred accounts. Or someone forgot to pay hosting.

In most cases, this situation is undesirable, and it should be eliminated as soon as possible. To do this, you need as soon as possible to find out about what happened. But how? For ourselves and our clients, we use site monitoring services. I will tell about them today.

How it works


The principle is simple: somewhere a program is constantly running that periodically contacts your server and checks its operation. If something is wrong, the program notifies you by e-mail or even by SMS.
')
In the simplest case, the program checks if the server is available. But it may happen that the server is available, and instead of the main page of your online store, users see the shameful "hosting is not paid" or "account is blocked."

Correct monitoring services allow you to monitor this situation. They can check the pages of the site for the presence of certain tags. This tag may be a piece of layout or HTML-comment.

Very advanced services allow you to check even the validity of the ssl-certificate.

According to the results of the week or month, the service may send a report. This is where you check your host's statements about uptime servers.

Can I do this thing myself?


Of course, you can “stir up” such a script yourself, it's easy. But services have an important advantage: firstly, all issues with programming, testing and support have already been resolved.

Secondly, if your script is physically located on one server, then its performance will depend on the performance of this server. Dozens of specialized services of such servers.

How much is it


Basic features are provided free of charge. For a reasonable fee, you can receive SMS-notifications

What we use


Basicstate.com


This service first tries to resolve the site address via DNS, then - to establish an HTTP connection, sends an HTTP request. Then it analyzes the response code and tries to get the page. Check - every 15 minutes.

Failures at different stages will be counted as errors of different types. Thus, it is possible to localize the problem. And it is very useful in situations when “everything works” from the host's subnet, and from the outside is not available.

The service allows you to "hang" on an account an unlimited number of sites.

An interesting feature is multiple notifications. For example, when a problem is detected, the service can write to the report if the site is down and after 15 minutes (it happens that the server has just rebooted) - it will notify you by email and SMS, and if it’s bad in an hour, it can be sent to the host’s support write.

Host-tracker.com


Large and satisfied advanced service, by the way, with the Russian version. Notifications can be sent both via ICQ and Gtalk (I have not tried other jabber).

Check on a free account - every 30 minutes. They write that they have 45 monitoring points. The initial paid rate includes checking the presence of a keyword on the page. This can be useful if you want to monitor some kind of service. Write a script that, when called, will check the operability and display the necessary word on the page at a special address, the service will periodically contact this address and track the keyword.

Finally


In general, colleagues, I suggest adding a connection to the site monitoring service to your customer service standards.

Source: https://habr.com/ru/post/58359/


All Articles