SigNoz / signoz-web

SigNoz Website
https://signoz.io
Other
5 stars 26 forks source link

add PromQL expressions for sample alerts in docs #145

Open pranay01 opened 2 years ago

pranay01 commented 2 years ago

For example

Alert for p99 latency for applications

you can use this to set alerts on percentile of latencies.

histogram_quantile(0.99, sum(rate(signoz_latency_bucket{service_name="customer", span_kind="SPAN_KIND_SERVER"}[5m])) by (le)) > 10

Above alert would be fired if p99 of customer service is >10 ms

ankitnayan commented 2 years ago

Alert for p99 latency of a specific endpoint of an application

histogram_quantile(0.99, sum(rate(signoz_latency_bucket{service_name="customer", operation="YOUR_API_NAME"}[5m])) by (le)) > 200

Above alert would be fired if p99 of customer service and endpoint YOUR_API_NAME is > 200 ms