With SigNoz, you can monitor the health of the HTTP endpoints and set up an alert in case of HTTP endpoints failure status codes.
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.