From 38cc9fbcbd98e8340c3772f5978ca9ccd27d3ffa Mon Sep 17 00:00:00 2001 From: liyang Date: Thu, 5 Dec 2024 23:36:49 +0800 Subject: [PATCH] chore: Add instance label information to the prometheusrule description Signed-off-by: liyang --- charts/kube-prometheus-stack/Chart.yaml | 2 +- .../templates/prometheus/rules-1.14/node-exporter.yaml | 2 +- .../templates/prometheus/rules-1.14/node-network.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/kube-prometheus-stack/Chart.yaml b/charts/kube-prometheus-stack/Chart.yaml index 56949182aacf..0d863509477e 100644 --- a/charts/kube-prometheus-stack/Chart.yaml +++ b/charts/kube-prometheus-stack/Chart.yaml @@ -23,7 +23,7 @@ name: kube-prometheus-stack sources: - https://github.com/prometheus-community/helm-charts - https://github.com/prometheus-operator/kube-prometheus -version: 66.3.1 +version: 66.3.2 appVersion: v0.78.2 kubeVersion: ">=1.19.0-0" home: https://github.com/prometheus-operator/kube-prometheus diff --git a/charts/kube-prometheus-stack/templates/prometheus/rules-1.14/node-exporter.yaml b/charts/kube-prometheus-stack/templates/prometheus/rules-1.14/node-exporter.yaml index 5b91565f42a6..f5455b4e0983 100644 --- a/charts/kube-prometheus-stack/templates/prometheus/rules-1.14/node-exporter.yaml +++ b/charts/kube-prometheus-stack/templates/prometheus/rules-1.14/node-exporter.yaml @@ -361,7 +361,7 @@ spec: {{- if .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting }} {{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.nodeExporterAlerting | indent 8 }} {{- end }} - description: '{{`{{`}} $value | humanizePercentage {{`}}`}} of conntrack entries are used.' + description: '{{`{{`}} $labels.instance {{`}}`}} {{`{{`}} $value | humanizePercentage {{`}}`}} of conntrack entries are used.' runbook_url: {{ .Values.defaultRules.runbookUrl }}/node/nodehighnumberconntrackentriesused summary: Number of conntrack are getting close to the limit. expr: (node_nf_conntrack_entries{job="node-exporter"} / node_nf_conntrack_entries_limit) > 0.75 diff --git a/charts/kube-prometheus-stack/templates/prometheus/rules-1.14/node-network.yaml b/charts/kube-prometheus-stack/templates/prometheus/rules-1.14/node-network.yaml index 16690ee3131a..ef93c123b000 100644 --- a/charts/kube-prometheus-stack/templates/prometheus/rules-1.14/node-network.yaml +++ b/charts/kube-prometheus-stack/templates/prometheus/rules-1.14/node-network.yaml @@ -33,7 +33,7 @@ spec: {{- if .Values.defaultRules.additionalRuleGroupAnnotations.network }} {{ toYaml .Values.defaultRules.additionalRuleGroupAnnotations.network | indent 8 }} {{- end }} - description: Network interface "{{`{{`}} $labels.device {{`}}`}}" changing its up status often on node-exporter {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.pod {{`}}`}} + description: The network interface "{{`{{`}} $labels.device {{`}}`}}" at "{{`{{`}} $labels.instance {{`}}`}}" changing its up status often on node-exporter {{`{{`}} $labels.namespace {{`}}`}}/{{`{{`}} $labels.pod {{`}}`}}. runbook_url: {{ .Values.defaultRules.runbookUrl }}/general/nodenetworkinterfaceflapping summary: Network interface is often changing its status expr: changes(node_network_up{job="node-exporter",device!~"veth.+"}[2m]) > 2