Regular pings are the simplest way to ensure that a website is up. But in many situations pinging the URL is not enough to find out if the application is operating properly.
It is also a good idea to track response times to detect any slowdowns. If a website is using SSL certificates then it’s important to ensure they never expire.
If your website has a catch-all page that is shown when any uncaught errors occur (instead of a generic Error 500 response), then using Netreo you can catch situations when text of monitored URL response is this error page.
In this article we’ll show how to quickly start monitoring any URL using Netreo, then we’ll demonstrate how you can verify when the error page is returned.
Start monitoring your website by following those steps:
1. Log in to Netreo
If you aren’t using Netreo yet, request a demo or talk to our expert team to sign up for a free trial.
2. Add URL monitoring
In Netreo portal click the “Add New” button in the top-right corner, and select the resource of type “Url”.
In this example we’ll use “Sample configuration for basic website”, which includes monitoring outages and response times. The template for secure website additionally tracks the SSL certificate expiration date.
3. Custom Headers/Agents, POST/PUT vs GET, Auth during monitoring any URL
When additional connection information, such as custom Headers, Authorization, etc. is required –“Advanced” tab should be used:
- Provide Credentials if the given Url requires authorization. Netreo supports basic and certificate auth.
- Change a Web request method that will be used to ping the website, by default Netreo uses “GET”. However, POST/PUT/DELETE are supported
- Specify Content Type for requests that are retrieving data via response, content type can be specified: e.g. application/json.
- Provide Custom Headers that will be used for all requests.
4. Define a metric tracking the response content
Sometimes it is important to validate that a specific response is returned by the URL. To do this, you can capture the response from the URL into a metric and alert on its contents if they do not match your expectations:
- On the “Metrics” tab of the Configuration Dialog for the URL, define a new metric of type “UrlResponseText”.
- Give it a name and save.
The new metric defined in a previous step can be used in alerts. Netreo can inspect the metric content and notify you when it doesn’t match expectations.
For example, to raise an alert whenever the custom error page is shown:
- In the “Alerts” tab define a new alert that will check if the returned response contains the text expected from the error page, e.g. for Google.com that will be “404. That’s an error.” (screenshot below).
- Give it a name and save.
In the same way, you can ensure that user login is successful by monitoring response code or response content.
If the returned response doesn’t satisfy the alert condition, in the chart you’ll see an alert icon. You will also receive an automatic email notification.