From 8c357c6bde4bd287dbfdd04fe756860705397dcc Mon Sep 17 00:00:00 2001 From: paulfantom <pawel@krupa.net.pl> Date: Tue, 20 Jul 2021 10:53:49 +0200 Subject: [PATCH] jsonnet: align alert annotations with best practices Signed-off-by: paulfantom <pawel@krupa.net.pl> --- .../kube-prometheus/components/mixin/alerts/node.libsonnet | 3 ++- jsonnet/kube-prometheus/platforms/eks.libsonnet | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/jsonnet/kube-prometheus/components/mixin/alerts/node.libsonnet b/jsonnet/kube-prometheus/components/mixin/alerts/node.libsonnet index 74cfb4f2..d022c599 100644 --- a/jsonnet/kube-prometheus/components/mixin/alerts/node.libsonnet +++ b/jsonnet/kube-prometheus/components/mixin/alerts/node.libsonnet @@ -7,7 +7,8 @@ { alert: 'NodeNetworkInterfaceFlapping', annotations: { - message: 'Network interface "{{ $labels.device }}" changing it\'s up status often on node-exporter {{ $labels.namespace }}/{{ $labels.pod }}', + summary: "Network interface is often changin it's status", + description: 'Network interface "{{ $labels.device }}" changing it\'s up status often on node-exporter {{ $labels.namespace }}/{{ $labels.pod }}', }, expr: ||| changes(node_network_up{%(nodeExporterSelector)s,%(hostNetworkInterfaceSelector)s}[2m]) > 2 diff --git a/jsonnet/kube-prometheus/platforms/eks.libsonnet b/jsonnet/kube-prometheus/platforms/eks.libsonnet index 76eeb385..b81d1cce 100644 --- a/jsonnet/kube-prometheus/platforms/eks.libsonnet +++ b/jsonnet/kube-prometheus/platforms/eks.libsonnet @@ -97,10 +97,11 @@ severity: 'critical', }, annotations: { - message: 'Instance {{ $labels.instance }} has less than 10 IPs available.', + summary: 'EKS CNI is running low on available IPs', + description: 'Instance {{ $labels.instance }} has only {{ $value }} IPs available which is lower than set threshold of %s' % $.values.eks.minimumAvailableIPs, }, 'for': $.values.eks.minimumAvailableIPsTime, - alert: 'EksAvailableIPs', + alert: 'EksCNILowAvailableIPs', }, ], }, -- GitLab