console/deployment/grafana-dashboards/Container-Logs.json

267 lines
6.1 KiB
JSON

{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"target": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dashboard"
},
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": 54,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": {
"type": "loki",
"uid": "grafanacloud-logs"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"axisSoftMin": 0,
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineStyle": {
"fill": "solid"
},
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"min": 0,
"noValue": "0",
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
}
]
},
"unit": "none"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 24,
"x": 0,
"y": 0
},
"id": 3,
"options": {
"legend": {
"calcs": ["mean", "count"],
"displayMode": "table",
"placement": "right",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "loki",
"uid": "grafanacloud-logs"
},
"editorMode": "builder",
"expr": "avg by(container_name) (rate({env=\"prod\"} |= `\"level\":50` [$__interval]))",
"key": "Q-0eeded78-b26f-4d43-af08-3cadcd2261f2-0",
"legendFormat": "{{container_name}}",
"queryType": "range",
"refId": "A"
}
],
"title": "Errors over time (all services)",
"type": "timeseries"
},
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 8
},
"id": 4,
"panels": [],
"repeat": "service",
"repeatDirection": "h",
"title": "$service",
"type": "row"
},
{
"datasource": {
"type": "loki",
"uid": "grafanacloud-logs"
},
"gridPos": {
"h": 13,
"w": 24,
"x": 0,
"y": 9
},
"id": 5,
"options": {
"dedupStrategy": "none",
"enableLogDetails": true,
"prettifyLogMessage": true,
"showCommonLabels": false,
"showLabels": false,
"showTime": true,
"sortOrder": "Descending",
"wrapLogMessage": false
},
"targets": [
{
"datasource": {
"type": "loki",
"uid": "grafanacloud-logs"
},
"editorMode": "code",
"expr": "{container_name=\"$service\"} | json | __error__!=\"JSONParserErr\" | level>30 ",
"hide": false,
"key": "Q-4f74f5b0-5837-415a-b726-56138193c25e-0",
"queryType": "range",
"refId": "A"
}
],
"title": "Recent Log Errors/Warnings of $service",
"type": "logs"
},
{
"datasource": {
"type": "loki",
"uid": "grafanacloud-logs"
},
"gridPos": {
"h": 11,
"w": 24,
"x": 0,
"y": 22
},
"id": 1,
"options": {
"dedupStrategy": "none",
"enableLogDetails": true,
"prettifyLogMessage": false,
"showCommonLabels": false,
"showLabels": false,
"showTime": true,
"sortOrder": "Descending",
"wrapLogMessage": false
},
"targets": [
{
"datasource": {
"type": "loki",
"uid": "grafanacloud-logs"
},
"editorMode": "code",
"expr": "{container_name=\"$service\"} | json | __error__!=\"JSONParserErr\" ",
"queryType": "range",
"refId": "A"
}
],
"title": "Service Logs of $service",
"type": "logs"
}
],
"refresh": "30s",
"revision": 1,
"schemaVersion": 38,
"style": "dark",
"tags": ["kubernetes", "logs"],
"templating": {
"list": [
{
"current": {
"selected": false,
"text": "rate-limiter",
"value": "rate-limiter"
},
"datasource": {
"type": "loki",
"uid": "grafanacloud-logs"
},
"definition": "",
"hide": 0,
"includeAll": false,
"label": "Service:",
"multi": false,
"name": "service",
"options": [],
"query": {
"label": "container_name",
"refId": "LokiVariableQueryEditor-VariableQuery",
"stream": "",
"type": 1
},
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"type": "query"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "Container Logs",
"uid": "ih6KH0aVz",
"version": 8,
"weekStart": ""
}