Fixed alert template
This commit is contained in:
@@ -60,6 +60,57 @@ data:
|
|||||||
labels:
|
labels:
|
||||||
severity: warning
|
severity: warning
|
||||||
|
|
||||||
|
- orgId: 1
|
||||||
|
name: kubernetes_alerts
|
||||||
|
folder: Kubernetes
|
||||||
|
interval: 30s
|
||||||
|
rules:
|
||||||
|
- uid: node_not_ready
|
||||||
|
title: Kubernetes Node Not Ready
|
||||||
|
condition: B
|
||||||
|
data:
|
||||||
|
- refId: A
|
||||||
|
relativeTimeRange:
|
||||||
|
from: 300
|
||||||
|
to: 0
|
||||||
|
datasourceUid: P76F38748CEC837F0
|
||||||
|
model:
|
||||||
|
expr: 'kube_node_status_condition{condition="Ready",status="true"} == 0'
|
||||||
|
refId: A
|
||||||
|
intervalMs: 1000
|
||||||
|
maxDataPoints: 43200
|
||||||
|
- refId: B
|
||||||
|
relativeTimeRange:
|
||||||
|
from: 300
|
||||||
|
to: 0
|
||||||
|
datasourceUid: __expr__
|
||||||
|
model:
|
||||||
|
conditions:
|
||||||
|
- evaluator:
|
||||||
|
params:
|
||||||
|
- 0
|
||||||
|
type: gt
|
||||||
|
operator:
|
||||||
|
type: and
|
||||||
|
query:
|
||||||
|
params: []
|
||||||
|
datasource:
|
||||||
|
type: __expr__
|
||||||
|
uid: __expr__
|
||||||
|
expression: A
|
||||||
|
reducer: last
|
||||||
|
refId: B
|
||||||
|
type: reduce
|
||||||
|
noDataState: Alerting
|
||||||
|
execErrState: Alerting
|
||||||
|
for: 0s
|
||||||
|
annotations:
|
||||||
|
node: '{{ $labels.node }}'
|
||||||
|
condition: '{{ $labels.condition }}'
|
||||||
|
summary: 'Kubernetes node is not ready'
|
||||||
|
labels:
|
||||||
|
severity: critical
|
||||||
|
|
||||||
contactpoints.yaml: |
|
contactpoints.yaml: |
|
||||||
apiVersion: 1
|
apiVersion: 1
|
||||||
contactPoints:
|
contactPoints:
|
||||||
@@ -79,11 +130,10 @@ data:
|
|||||||
📊 <b>{{ .Labels.alertname }}</b>
|
📊 <b>{{ .Labels.alertname }}</b>
|
||||||
{{ .Annotations.summary }}
|
{{ .Annotations.summary }}
|
||||||
|
|
||||||
🎯 <b>Details:</b>
|
{{ if .Annotations.node }}🖥 <b>Node:</b> <code>{{ .Annotations.node }}</code>{{ end }}
|
||||||
• Pod: <code>{{ .Annotations.pod }}</code>
|
{{ if .Annotations.pod }}📦 <b>Pod:</b> <code>{{ .Annotations.pod }}</code>{{ end }}
|
||||||
• Node: <code>{{ .Annotations.node }}</code>
|
{{ if .Annotations.namespace }}📁 <b>Namespace:</b> <code>{{ .Annotations.namespace }}</code>{{ end }}
|
||||||
• Namespace: <code>{{ .Annotations.namespace }}</code>
|
{{ if .Annotations.throttle_rate }}⚠️ <b>Throttling rate:</b> {{ .Annotations.throttle_rate }}{{ end }}
|
||||||
• Throttling rate: {{ .Annotations.throttle_rate }}
|
|
||||||
|
|
||||||
🔗 <a href="{{ .GeneratorURL }}">View in Grafana</a>
|
🔗 <a href="{{ .GeneratorURL }}">View in Grafana</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|||||||
Reference in New Issue
Block a user