How to automatically snapshot your site when it crashes


What does a site look like when I don’t look at it? The question from the category "Does the world exist when I close my eyes?", Only in this case a deep philosophical meaning is also fraught with real consequences. This is if he suddenly looks bad or does not work at all. HostTracker offers a tool for spying on sites - snapshot function. The practical meaning is disclosed below.

What is happening with my site?


Using various services and applications to support a site often leads to the identification of a variety of problems. There are often situations when, for example, YandexMetrica writes about an error and recovery, but what exactly happened is unclear. You need to delve into the logs, slow down the hosting support and perform many other tedious (and not the fact that not useless) actions. There are more interesting cases - the site may not open from a certain country, or it may not be fully loaded. Such problems can live for months, and even years, until you accidentally discover them. There is another aspect - for certain purposes, you can use site content verification, as, for example, here. This check will regularly notify the site admin if the expected content has disappeared from it for some reason - for example, it cannot load from the database. But to see what the site looks like at the moment of this error can be difficult, because at this point in time the admin, of course, will sleep / take a shower / drink beer or take some other useful actions.
To solve this problem, HostTrackeroffers a new feature - snapshot. It is very easy to use and does not require any additional settings. It’s just that every time you fix an error, the service makes a snapshot of the desired page and saves it available for viewing in two forms: the code of the page and its actual form, as it were, from the browser. Thus, you can easily check what exactly did not load and go straight to fixing the problem, bypassing the diagnostic item, which significantly saves time for the administrator, developers and other parties involved.

How it works


During regular checking, checking servers at a certain interval try to load the page being checked. At the same time, additional functions can be used - for example, parsing a page and searching for certain keywords, which helps to be sure that this is the right page, and not, for example, an error page substituted for it, or some kind of redirect.
If no errors are found, excellent. If it is present, then a log is written, a message is sent about the site inaccessible (by all the selected methods), and a snapshot is made and saved - so that you can determine what happened and what the site looked like at that moment.

Also, it is possible to view the audit logs in which snapshots will be saved for the corresponding errors:

However, there are a number of comments. Firstly, with snapshots, as with regular checks, javascript is not executed. Secondly, the error should be one that can be fixed. That is, the checking server should get at least something. In cases when the connection is not established or falls off by timeout - unfortunately, the snapshot will not be able to help, and only an error record will be found in the logs.

Also popular now: