diff --git a/chart/infra-server/templates/monitoring/rules.yaml b/chart/infra-server/templates/monitoring/rules.yaml index 28330aa7c..b2c555828 100644 --- a/chart/infra-server/templates/monitoring/rules.yaml +++ b/chart/infra-server/templates/monitoring/rules.yaml @@ -5,13 +5,15 @@ kind: PrometheusRule metadata: name: argo-workflow-failures namespace: monitoring + labels: + release: {{ .Release.Name }} spec: groups: - name: Workflow failures interval: 30s rules: - alert: Workflow Error - expr: increase(argo_workflows_gauge{status="Error"}[5m]) > 0 + expr: increase(argo_workflows_gauge{phase="Error"}[5m]) > 0 for: 1m annotations: summary: A workflow has errored @@ -21,7 +23,7 @@ spec: namespace: monitoring environment: {{ .Values.environment }} - alert: Workflow Failure - expr: increase(argo_workflows_gauge{status="Failed"}[5m]) > 0 + expr: increase(argo_workflows_gauge{phase="Failed"}[5m]) > 0 for: 1m annotations: summary: A workflow has failed. diff --git a/chart/infra-server/templates/monitoring/services.yaml b/chart/infra-server/templates/monitoring/services.yaml index 381286da9..ff78a8c75 100644 --- a/chart/infra-server/templates/monitoring/services.yaml +++ b/chart/infra-server/templates/monitoring/services.yaml @@ -1,3 +1,4 @@ +{{- if .Values.monitoring.enabled }} --- apiVersion: v1 kind: Service @@ -30,3 +31,4 @@ spec: targetPort: 9101 selector: app.kubernetes.io/name: infra-server +{{- end }}