From 2b167210f8133969de787741cb3afc0122b0e1a7 Mon Sep 17 00:00:00 2001 From: Matt Wise <768067+diranged@users.noreply.github.com> Date: Thu, 13 Jun 2024 15:16:47 -0700 Subject: [PATCH] fix(istio-alerts): revert to native raw metrics (#314) Co-authored-by: Matt Wise --- charts/istio-alerts/Chart.yaml | 2 +- charts/istio-alerts/README.md | 2 +- charts/istio-alerts/templates/service-prometheusrule.yaml | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/charts/istio-alerts/Chart.yaml b/charts/istio-alerts/Chart.yaml index 53149b3f..de9de22e 100644 --- a/charts/istio-alerts/Chart.yaml +++ b/charts/istio-alerts/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: istio-alerts description: A Helm chart that provisions a series of alerts for istio VirtualServices type: application -version: 0.5.1 +version: 0.5.2 maintainers: - name: diranged email: matt@nextdoor.com diff --git a/charts/istio-alerts/README.md b/charts/istio-alerts/README.md index 53590a89..494c8047 100644 --- a/charts/istio-alerts/README.md +++ b/charts/istio-alerts/README.md @@ -1,6 +1,6 @@ # istio-alerts -![Version: 0.5.1](https://img.shields.io/badge/Version-0.5.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) +![Version: 0.5.2](https://img.shields.io/badge/Version-0.5.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) A Helm chart that provisions a series of alerts for istio VirtualServices diff --git a/charts/istio-alerts/templates/service-prometheusrule.yaml b/charts/istio-alerts/templates/service-prometheusrule.yaml index c90f3299..36c1c835 100644 --- a/charts/istio-alerts/templates/service-prometheusrule.yaml +++ b/charts/istio-alerts/templates/service-prometheusrule.yaml @@ -26,16 +26,16 @@ spec: in namespace {{`{{$labels.namespace}}`}}. expr: > sum by ({{- $http5XXMonitorGroupingLabelString -}}) ( - istio_requests_increase5m{ + rate(istio_requests_total{ response_code=~"5.*", {{- $destinationServiceSelectorForIstioMetrics -}} - } + }[5m]) ) / sum by ({{- $http5XXMonitorGroupingLabelString -}}) ( - istio_requests_increase5m{ + rate(istio_requests_total{ {{- $destinationServiceSelectorForIstioMetrics -}} - } + }[5m]) ) > {{ .threshold }} for: {{ .for }}