๐ก Grafana Dashboards & Prometheus Data Source โ Executive Summary
Technical architectural analysis, practical configuration manifests, and deployment instructions for Grafana Dashboards & Prometheus Data Source.
Alert
Create Alert Rule
graphql
# A : prometheus Query: 10๋ถ๋์ restart๋ ํ์
sum by(container,namespace,pod) (changes(kube_pod_container_status_restarts_total[10m]))
# B : Expression: Reduce A
# C : Expression: Math $B > 0 -- ์กฐ๊ฑด์์ผ๋ก ์ฌ์ฉ
Create Template
go
//[{{.Status}}] {{ range .Alerts }}{{ .Labels.alertname }} / {{ .Labels.team }}{{ end }}
[{{.Status}}] {{ .CommonLabels.alertname }} / {{ .CommonLabels.team }}
go
{{ len .Alerts.Firing }} firing. {{ len .Alerts.Resolved }} resolved.
----------------- list -----------------
{{ range .Alerts }}
namespace: {{ .Labels.namespace }}
pod: {{ .Labels.pod }}
container: {{ .Labels.container }}
status: {{ .Status }}
----------------------------------------
{{ end }}
Create Contact Point
Use an existing defined template




Leave a Reply