Update dashboards

This commit is contained in:
2024-01-25 23:34:34 +00:00
parent ed46799948
commit 88bcfae8e7
5 changed files with 3411 additions and 3229 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,332 +1,332 @@
{ {
"__inputs": [ "__inputs": [
{ {
"name": "DS_LOKI", "description": "",
"label": "Loki", "label": "Loki",
"description": "", "name": "DS_LOKI",
"type": "datasource", "pluginId": "loki",
"pluginId": "loki", "pluginName": "Loki",
"pluginName": "Loki" "type": "datasource"
}
],
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"target": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dashboard"
},
"type": "dashboard"
},
{
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"enable": true,
"iconColor": "red",
"name": "flux events",
"target": {
"limit": 100,
"matchAny": false,
"tags": [
"flux"
],
"type": "tags"
} }
} ],
] "annotations": {
}, "list": [
"description": "Flux logs collected from Kubernetes, stored in Loki", {
"editable": true, "builtIn": 1,
"gnetId": null, "datasource": "-- Grafana --",
"graphTooltip": 0, "enable": true,
"id": 29, "hide": true,
"iteration": 1653748775696, "iconColor": "rgba(0, 211, 255, 1)",
"links": [], "name": "Annotations & Alerts",
"liveNow": false, "target": {
"panels": [ "limit": 100,
{ "matchAny": false,
"datasource": "${DS_LOKI}", "tags": [],
"description": "", "type": "dashboard"
"fieldConfig": { },
"defaults": { "type": "dashboard"
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "bars",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
}, },
"lineInterpolation": "linear", {
"lineWidth": 1, "datasource": {
"pointSize": 5, "type": "datasource",
"scaleDistribution": { "uid": "grafana"
"type": "linear" },
}, "enable": true,
"showPoints": "auto", "iconColor": "red",
"spanNulls": false, "name": "flux events",
"stacking": { "target": {
"group": "A", "limit": 100,
"mode": "none" "matchAny": false,
}, "tags": [
"thresholdsStyle": { "flux"
"mode": "off" ],
"type": "tags"
}
} }
}, ]
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 4,
"w": 24,
"x": 0,
"y": 0
},
"id": 4,
"options": {
"legend": {
"calcs": [],
"displayMode": "hidden",
"placement": "bottom"
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": "${DS_LOKI}",
"expr": "sum(count_over_time({namespace=~\"$namespace\", stream=~\"$stream\", app =~\"$controller\"} | json | __error__!=\"JSONParserErr\" | level=~\"$level\" |= \"$query\" [$__interval]))",
"instant": false,
"legendFormat": "Log count",
"range": true,
"refId": "A"
}
],
"type": "timeseries"
}, },
{ "description": "Flux logs collected from Kubernetes, stored in Loki",
"datasource": "${DS_LOKI}", "editable": true,
"description": "Logs from services running in Kubernetes", "gnetId": null,
"gridPos": { "graphTooltip": 0,
"h": 25, "id": 29,
"w": 24, "iteration": 1653748775696,
"x": 0, "links": [],
"y": 4 "liveNow": false,
}, "panels": [
"id": 2,
"options": {
"dedupStrategy": "numbers",
"enableLogDetails": false,
"prettifyLogMessage": true,
"showCommonLabels": false,
"showLabels": false,
"showTime": false,
"sortOrder": "Descending",
"wrapLogMessage": false
},
"targets": [
{ {
"datasource": "${DS_LOKI}", "datasource": "${DS_LOKI}",
"expr": "{namespace=~\"$namespace\", stream=~\"$stream\", app =~\"$controller\"} | json | __error__!=\"JSONParserErr\" | level=~\"$level\" |= \"$query\"", "description": "",
"refId": "A" "fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "bars",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 4,
"w": 24,
"x": 0,
"y": 0
},
"id": 4,
"options": {
"legend": {
"calcs": [],
"displayMode": "hidden",
"placement": "bottom"
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": "${DS_LOKI}",
"expr": "sum(count_over_time({namespace=~\"$namespace\", stream=~\"$stream\", app =~\"$controller\"} | json | __error__!=\"JSONParserErr\" | level=~\"$level\" |= \"$query\" [$__interval]))",
"instant": false,
"legendFormat": "Log count",
"range": true,
"refId": "A"
}
],
"type": "timeseries"
},
{
"datasource": "${DS_LOKI}",
"description": "Logs from services running in Kubernetes",
"gridPos": {
"h": 25,
"w": 24,
"x": 0,
"y": 4
},
"id": 2,
"options": {
"dedupStrategy": "numbers",
"enableLogDetails": false,
"prettifyLogMessage": true,
"showCommonLabels": false,
"showLabels": false,
"showTime": false,
"sortOrder": "Descending",
"wrapLogMessage": false
},
"targets": [
{
"datasource": "${DS_LOKI}",
"expr": "{namespace=~\"$namespace\", stream=~\"$stream\", app =~\"$controller\"} | json | __error__!=\"JSONParserErr\" | level=~\"$level\" |= \"$query\"",
"refId": "A"
}
],
"type": "logs"
} }
], ],
"type": "logs" "refresh": "10s",
} "schemaVersion": 36,
], "style": "light",
"refresh": "10s", "tags": [
"schemaVersion": 36, "flux"
"style": "light", ],
"tags": [ "templating": {
"flux" "list": [
], {
"templating": { "current": {
"list": [ "selected": false,
{ "text": "",
"current": { "value": ""
"selected": false, },
"text": "", "description": "String to search for",
"value": "" "hide": 0,
}, "label": "Search Query",
"description": "String to search for", "name": "query",
"hide": 0, "options": [
"label": "Search Query", {
"name": "query", "selected": true,
"options": [ "text": "",
{ "value": ""
"selected": true, }
"text": "", ],
"value": "" "query": "",
} "skipUrlSync": false,
], "type": "textbox"
"query": "", },
"skipUrlSync": false, {
"type": "textbox" "allValue": "info|error",
}, "current": {
{ "selected": false,
"allValue": "info|error", "text": "All",
"current": { "value": "$__all"
"selected": false, },
"text": "All", "hide": 0,
"value": "$__all" "includeAll": true,
}, "multi": false,
"hide": 0, "name": "level",
"includeAll": true, "options": [
"multi": false, {
"name": "level", "selected": true,
"options": [ "text": "All",
{ "value": "$__all"
"selected": true, },
"text": "All", {
"value": "$__all" "selected": false,
}, "text": "info",
{ "value": "info"
"selected": false, },
"text": "info", {
"value": "info" "selected": false,
}, "text": "error",
{ "value": "error"
"selected": false, }
"text": "error", ],
"value": "error" "query": "info,error",
} "queryValue": "",
], "skipUrlSync": false,
"query": "info,error", "type": "custom"
"queryValue": "", },
"skipUrlSync": false, {
"type": "custom" "allValue": ".+",
}, "current": {
{ "selected": true,
"allValue": ".+", "text": [
"current": { "All"
"selected": true, ],
"text": [ "value": [
"All" "$__all"
], ]
"value": [ },
"$__all" "datasource": "${DS_LOKI}",
] "definition": "label_values(app)",
}, "hide": 0,
"datasource": "${DS_LOKI}", "includeAll": true,
"definition": "label_values(app)", "multi": true,
"hide": 0, "name": "controller",
"includeAll": true, "options": [],
"multi": true, "query": "label_values(app)",
"name": "controller", "refresh": 1,
"options": [], "regex": "",
"query": "label_values(app)", "skipUrlSync": false,
"refresh": 1, "sort": 0,
"regex": "", "type": "query"
"skipUrlSync": false, },
"sort": 0, {
"type": "query" "allValue": ".+",
}, "current": {
{ "selected": true,
"allValue": ".+", "text": [
"current": { "flux-system"
"selected": true, ],
"text": [ "value": [
"flux-system" "flux-system"
], ]
"value": [ },
"flux-system" "datasource": "${DS_LOKI}",
] "definition": "label_values(namespace)",
}, "hide": 0,
"datasource": "${DS_LOKI}", "includeAll": true,
"definition": "label_values(namespace)", "multi": true,
"hide": 0, "name": "namespace",
"includeAll": true, "options": [],
"multi": true, "query": "label_values(namespace)",
"name": "namespace", "refresh": 1,
"options": [], "regex": "",
"query": "label_values(namespace)", "skipUrlSync": false,
"refresh": 1, "sort": 0,
"regex": "", "type": "query"
"skipUrlSync": false, },
"sort": 0, {
"type": "query" "allValue": ".+",
}, "current": {
{ "selected": false,
"allValue": ".+", "text": "All",
"current": { "value": "$__all"
"selected": false, },
"text": "All", "datasource": "${DS_LOKI}",
"value": "$__all" "definition": "label_values(stream)",
}, "hide": 0,
"datasource": "${DS_LOKI}", "includeAll": true,
"definition": "label_values(stream)", "multi": true,
"hide": 0, "name": "stream",
"includeAll": true, "options": [],
"multi": true, "query": "label_values(stream)",
"name": "stream", "refresh": 1,
"options": [], "regex": "",
"query": "label_values(stream)", "skipUrlSync": false,
"refresh": 1, "sort": 0,
"regex": "", "type": "query"
"skipUrlSync": false, },
"sort": 0, {
"type": "query" "current": {
}, "selected": false,
{ "text": "Loki",
"current": { "value": "Loki"
"selected": false, },
"text": "Loki", "hide": 0,
"value": "Loki" "includeAll": false,
}, "label": "Datasource",
"hide": 0, "multi": false,
"includeAll": false, "name": "DS_LOKI",
"label": "Datasource", "options": [],
"multi": false, "query": "loki",
"name": "DS_LOKI", "refresh": 1,
"options": [], "regex": "",
"query": "loki", "skipUrlSync": false,
"refresh": 1, "type": "datasource"
"regex": "", }
"skipUrlSync": false, ]
"type": "datasource" },
} "time": {
] "from": "now-6h",
}, "to": "now"
"time": { },
"from": "now-6h", "timepicker": {},
"to": "now" "timezone": "",
}, "title": "Flux Logs",
"timepicker": {}, "uid": "flux-logs",
"timezone": "", "version": 2
"title": "Flux Logs", }
"uid": "flux-logs",
"version": 2
}

View File

@@ -13,4 +13,4 @@ configMapGenerator:
labels: labels:
grafana_dashboard: "1" grafana_dashboard: "1"
app.kubernetes.io/part-of: flux app.kubernetes.io/part-of: flux
app.kubernetes.io/component: monitoring app.kubernetes.io/component: monitoring

View File

@@ -26,4 +26,4 @@ spec:
# https://github.com/prometheus-operator/prometheus-operator/issues/4816 # https://github.com/prometheus-operator/prometheus-operator/issues/4816
- sourceLabels: [__meta_kubernetes_pod_phase] - sourceLabels: [__meta_kubernetes_pod_phase]
action: keep action: keep
regex: Running regex: Running