Monitor HTTP Endpoints
This feature is available 0.11.3 onwards. If you are on a lower version, please follow these instructions to upgrade
With SigNoz, you can monitor the health of the HTTP endpoints and set up an alert in case of HTTP endpoints failure status codes.
Steps to monitor the health of the HTTP endpoints:
Add the httpcheck receiver to
The HTTP Check Receiver can be used for synthetic checks against HTTP endpoints. This receiver will make a request to the specified endpoint using the configured method. This scraper generates a metric labelled for each HTTP response status class with a value of 1 if the status code matches the class.
Next, we will modify the pipeline to include the receiver we have enabled above.
receivers: [otlp, httpcheck]
We can restart the otel collector container so that new changes are applied and see the metrics generated for synthetic checks.
This receiver creates a metric name
httpcheck_statuswith value 1 if the check resulted in status_code matching the status_class, otherwise 0. For more info on the additional metrics and attributes available, please read the documentation here.
Monitoring Health of Multiple Endpoints
If you want to monitor the health of multiple endpoints with this receiver, then you need to add one instance of receiver for each endpoint since it currently supports only one endpoint. Following is the sample config that monitors two endpoints.
receivers: [otlp, httpcheck/example, httpcheck/my-app]