Grafana Dashboards & Prometheus Data Source

๐Ÿ’ก 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

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *