Application Health Checks
Uptime monitoring for HTTP endpoints and APIs
The Seq.Input.HealthCheck app periodically GET
s an HTTP or HTTPS URL and logs various response metrics to Seq.
The resulting stream of log events can be used for uptime monitoring, alerting, trend analysis, and diagnostics.
Seq.Input.HealthCheck is a Seq App that needs to be installed and configured before it can be used.
The app is installed once, and then an instance of the app is configured for each URL that needs to be health-checked.
Installing the Input
In Data > _Ingestion, select Install Input Apps:
The input's package id is Seq.Input.HealthCheck:
Once the app is installed, you'll be returned to Data > Ingestion where you can add a URL to check.
Checking a URL
The app will periodically issue an HTTP GET
request to a specified URL. A new instance of the app needs to be run for each URL that will be checked.
Still in the Ingestion screen, select Add Health Check Input.
This will request a number of details including the URL and checking interval.
Note that health check events take up space on the Seq server. The default checking interval of 60 seconds is recommended for most health checks.
If the URL is an HTTPS URL, then the Seq server must trust the SSL certificate that the target server is using.
Once the instance of the app is saved, it will show in the inputs list.
Use the Add Instance button to check more URLs.
Health Check Events
Each time a check is completed, details of the response will be written back to the Seq event stream:
The events include various properties describing the response.
If a health check fails, the event's level will be set to Error
:
Network failures like the one above will display a StatusCode
of null
, since no HTTP request could be completed. If the request is completed but the status code does not indicate success, this will be included in the event, too.
Further reading
- The next step after configuring health checks is often to configure alerts based on unexpected, failed or slow responses.
- For information on integrating with ASP.NET Core health checks, see ;this article](https://blog.datalust.co/simple-health-checks-for-any-url/).
- Seq.Input.CertificateCheck is a similar input that checks SSL certificate validity and time-to-expiry, written by Jan-Pieter Zoutewelle.
Updated 12 months ago