Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(istio-alerts): Add common selector helper for istio and ksm met…
…rics (#288) This PR follows patterns established in https://github.com/Nextdoor/k8s-charts/blob/8655ff4458e309e86232c4ae0a1fecfcb2cbf0c3/charts/prometheus-alerts/templates/_helpers.tpl#L21-L59 Proof: ```diff akennedy@ndm2a istio-alerts % diff -bu orig new --- orig 2024-04-17 16:29:11 +++ new 2024-04-17 16:27:28 @@ -59,17 +59,11 @@ expr: > sum by (destination_service_name, reporter, source_workload) ( istio_requests:increase5m{ - response_code=~"5.*", - destination_service_namespace="monolith", - destination_service_name=~".*" - } + response_code=~"5.*",destination_service_name=~".*", destination_service_namespace="monolith"} ) / sum by (destination_service_name, reporter, source_workload) ( - istio_requests:increase5m{ - destination_service_namespace="monolith", - destination_service_name=~".*" - } + istio_requests:increase5m{destination_service_name=~".*", destination_service_namespace="monolith"} ) > 0.0005 for: 5m @@ -88,10 +82,7 @@ histogram_quantile( 0.95, sum(irate( - istio_request_duration_milliseconds_bucket{ - destination_service_namespace="monolith", - destination_service_name=~".*" - }[5m] + istio_request_duration_milliseconds_bucket{destination_service_name=~".*", destination_service_namespace="monolith"}[5m] )) by ( destination_service_name, reporter, @@ -119,10 +110,7 @@ expr: >- ( count( - kube_service_info{ - namespace="monolith", - name=~".*" - } + kube_service_info{job="kube-state-metrics", service=~".*", namespace="monolith"} ) or on() vector(0) ) == 0 for: 1h ```
- Loading branch information