titan-iac/services/monitoring/grafana-dashboard-public.yaml

311 lines
7.8 KiB
YAML
Raw Normal View History

# services/monitoring/grafana-dashboard-public.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: grafana-dashboard-public
labels:
grafana_dashboard: "1"
data:
atlas-public-overview.json: |
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": false,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": null,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": {
"type": "prometheus",
"uid": "atlas-vm"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "none"
},
"overrides": []
},
"gridPos": {
"h": 7,
"w": 6,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"text": {},
"textMode": "auto"
},
"pluginVersion": "10.4.0",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "atlas-vm"
},
"editorMode": "code",
"expr": "sum(kube_pod_status_phase{phase=\"Running\"})",
"legendFormat": "",
"range": true,
"refId": "A"
}
],
"title": "Running pods",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "atlas-vm"
},
"description": "Aggregated CPU usage across all schedulable nodes.",
"fieldConfig": {
"defaults": {
"color": {
"mode": "continuous-BlYlRd"
},
"mappings": [],
"max": 100,
"min": 0,
"thresholds": {
"mode": "percentage",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "yellow",
"value": 60
},
{
"color": "red",
"value": 85
}
]
},
"unit": "percent"
},
"overrides": []
},
"gridPos": {
"h": 7,
"w": 6,
"x": 6,
"y": 0
},
"id": 2,
"options": {
"colorMode": "value",
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"text": {},
"textMode": "auto"
},
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "atlas-vm"
},
"expr": "avg(100 - (avg by (instance) (rate(node_cpu_seconds_total{mode=\"idle\"}[5m])) * 100))",
"legendFormat": "",
"refId": "A"
}
],
"title": "Average node CPU",
"type": "stat"
},
{
"datasource": {
"type": "prometheus",
"uid": "atlas-vm"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 7
},
"id": 3,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "atlas-vm"
},
"expr": "sum(kube_pod_status_phase{phase=\"Running\"}) by (namespace)",
"legendFormat": "{{namespace}}",
"refId": "A"
}
],
"title": "Running pods per namespace",
"type": "bargauge",
"options": {
"displayMode": "gradient",
"orientation": "horizontal",
"reduceOptions": {
"calcs": ["lastNotNull"],
"fields": "",
"values": false
},
"showUnfilled": false
}
},
{
"datasource": {
"type": "prometheus",
"uid": "atlas-vm"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 15
},
"id": 4,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "atlas-vm"
},
"expr": "sum(kube_node_status_condition{condition=\"Ready\",status=\"true\"})",
"legendFormat": "Ready",
"refId": "A"
},
{
"datasource": {
"type": "prometheus",
"uid": "atlas-vm"
},
"expr": "sum(kube_node_status_condition{condition=\"Ready\",status=\"false\"})",
"legendFormat": "Not Ready",
"refId": "B"
}
],
"title": "Node readiness",
"type": "piechart",
"options": {
"legend": {
"displayMode": "table",
"placement": "right"
},
"pieType": "donut"
}
},
{
"datasource": {
"type": "prometheus",
"uid": "atlas-vm"
},
"gridPos": {
"h": 8,
"w": 12,
"x": 0,
"y": 23
},
"id": 5,
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "atlas-vm"
},
"expr": "sum by (namespace) (increase(kube_pod_status_phase{phase=\"Failed\"}[1d]))",
"legendFormat": "{{namespace}}",
"refId": "A"
}
],
"title": "Failed pods (24h)",
"type": "table",
"fieldConfig": {
"defaults": {
"unit": "none",
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{"color": "green", "value": null},
{"color": "red", "value": 1}
]
}
},
"overrides": []
},
"options": {
"showHeader": true
}
}
],
"refresh": "30s",
"schemaVersion": 39,
"style": "dark",
"tags": [
"atlas",
"public"
],
"templating": {
"list": []
},
"time": {
"from": "now-12h",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "Atlas Public Overview",
"uid": "atlas-public",
"version": 1,
"weekStart": ""
}