Before you think about dashboards or alerts, the first thing you need to decide is where this data is coming from and how you are collecting it. For example: if you are parsing web server logs, then you need to increment counters for different status codes. grok_exporter or mtail can help you with that. If you want to make active tests (probes) of a remote webserver, then something like blackbox_exporter can help you, and it returns the http status code as one of its metrics. > For example 502 error there won't be any logs when I am not able to access an endpoint
It's unclear what problem it is you are having. If the webserver itself returns a 502 error, then it will log the fact that it has done so, just like any other response. Equally, if blackbox_exporter gets a 502 response from a webserver, then it will report it as a 502. Both cases are suitable for reporting and alerting. On Monday, 4 April 2022 at 09:21:06 UTC+1 [email protected] wrote: > Does anyone have a dashboard/alerts for HTTP errors? I am having trouble > creating one. For example 502 error there won't be any logs when I am not > able to access an endpoint. -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/61a6ffb0-d5f4-4367-a051-5ecc82445b75n%40googlegroups.com.

