392 lines
9 KiB
JSON
392 lines
9 KiB
JSON
{
|
|
"__inputs": [
|
|
{
|
|
"name": "DS_VICTORIALOGS",
|
|
"label": "VictoriaLogs",
|
|
"description": "",
|
|
"type": "datasource",
|
|
"pluginId": "victorialogs-datasource",
|
|
"pluginName": "VictoriaLogs"
|
|
}
|
|
],
|
|
"__elements": {},
|
|
"__requires": [
|
|
{
|
|
"type": "grafana",
|
|
"id": "grafana",
|
|
"name": "Grafana",
|
|
"version": "11.2.0"
|
|
},
|
|
{
|
|
"type": "panel",
|
|
"id": "logs",
|
|
"name": "Logs",
|
|
"version": ""
|
|
},
|
|
{
|
|
"type": "datasource",
|
|
"id": "prometheus",
|
|
"name": "Prometheus",
|
|
"version": "1.0.0"
|
|
},
|
|
{
|
|
"type": "panel",
|
|
"id": "timeseries",
|
|
"name": "Time series",
|
|
"version": ""
|
|
},
|
|
{
|
|
"type": "datasource",
|
|
"id": "victorialogs-datasource",
|
|
"name": "VictoriaLogs",
|
|
"version": "0.4.0"
|
|
}
|
|
],
|
|
"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"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"description": "Flux logs collected from Kubernetes, stored in VictoriaLogs",
|
|
"editable": true,
|
|
"fiscalYearStartMonth": 0,
|
|
"graphTooltip": 0,
|
|
"id": null,
|
|
"links": [],
|
|
"liveNow": false,
|
|
"panels": [
|
|
{
|
|
"datasource": {
|
|
"type": "victorialogs-datasource",
|
|
"uid": "${DS_VICTORIALOGS}"
|
|
},
|
|
"description": "",
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"mode": "palette-classic"
|
|
},
|
|
"custom": {
|
|
"axisBorderShow": false,
|
|
"axisCenteredZero": false,
|
|
"axisColorMode": "text",
|
|
"axisLabel": "",
|
|
"axisPlacement": "auto",
|
|
"barAlignment": 0,
|
|
"barWidthFactor": 0.6,
|
|
"drawStyle": "bars",
|
|
"fillOpacity": 0,
|
|
"gradientMode": "none",
|
|
"hideFrom": {
|
|
"legend": false,
|
|
"tooltip": false,
|
|
"viz": false
|
|
},
|
|
"insertNulls": 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": "list",
|
|
"placement": "bottom",
|
|
"showLegend": false
|
|
},
|
|
"tooltip": {
|
|
"mode": "single",
|
|
"sort": "none"
|
|
}
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "victorialogs-datasource",
|
|
"uid": "${DS_VICTORIALOGS}"
|
|
},
|
|
"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": {
|
|
"type": "victorialogs-datasource",
|
|
"uid": "${DS_VICTORIALOGS}"
|
|
},
|
|
"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": {
|
|
"type": "victorialogs-datasource",
|
|
"uid": "${DS_VICTORIALOGS}"
|
|
},
|
|
"expr": "{namespace=~\"$namespace\", stream=~\"$stream\", app =~\"$controller\"} | json | __error__!=\"JSONParserErr\" | level=~\"$level\" |= \"$query\"",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"type": "logs"
|
|
}
|
|
],
|
|
"refresh": "10s",
|
|
"schemaVersion": 39,
|
|
"tags": [
|
|
"flux"
|
|
],
|
|
"templating": {
|
|
"list": [
|
|
{
|
|
"current": {
|
|
"selected": false,
|
|
"text": "",
|
|
"value": ""
|
|
},
|
|
"description": "String to search for",
|
|
"hide": 0,
|
|
"label": "Search Query",
|
|
"name": "query",
|
|
"options": [
|
|
{
|
|
"selected": true,
|
|
"text": "",
|
|
"value": ""
|
|
}
|
|
],
|
|
"query": "",
|
|
"skipUrlSync": false,
|
|
"type": "textbox"
|
|
},
|
|
{
|
|
"allValue": "info|error",
|
|
"current": {
|
|
"selected": false,
|
|
"text": "All",
|
|
"value": "$__all"
|
|
},
|
|
"hide": 0,
|
|
"includeAll": true,
|
|
"multi": false,
|
|
"name": "level",
|
|
"options": [
|
|
{
|
|
"selected": true,
|
|
"text": "All",
|
|
"value": "$__all"
|
|
},
|
|
{
|
|
"selected": false,
|
|
"text": "info",
|
|
"value": "info"
|
|
},
|
|
{
|
|
"selected": false,
|
|
"text": "error",
|
|
"value": "error"
|
|
}
|
|
],
|
|
"query": "info,error",
|
|
"queryValue": "",
|
|
"skipUrlSync": false,
|
|
"type": "custom"
|
|
},
|
|
{
|
|
"allValue": ".+",
|
|
"current": {
|
|
"selected": true,
|
|
"text": [
|
|
"All"
|
|
],
|
|
"value": [
|
|
"$__all"
|
|
]
|
|
},
|
|
"datasource": {
|
|
"type": "victorialogs-datasource",
|
|
"uid": "${DS_VICTORIALOGS}"
|
|
},
|
|
"definition": "label_values(app)",
|
|
"hide": 0,
|
|
"includeAll": true,
|
|
"multi": true,
|
|
"name": "controller",
|
|
"options": [],
|
|
"query": "label_values(app)",
|
|
"refresh": 1,
|
|
"regex": "",
|
|
"skipUrlSync": false,
|
|
"sort": 0,
|
|
"type": "query"
|
|
},
|
|
{
|
|
"allValue": ".+",
|
|
"current": {
|
|
"selected": true,
|
|
"text": [
|
|
"flux-system"
|
|
],
|
|
"value": [
|
|
"flux-system"
|
|
]
|
|
},
|
|
"datasource": {
|
|
"type": "victorialogs-datasource",
|
|
"uid": "${DS_VICTORIALOGS}"
|
|
},
|
|
"definition": "label_values(namespace)",
|
|
"hide": 0,
|
|
"includeAll": true,
|
|
"multi": true,
|
|
"name": "namespace",
|
|
"options": [],
|
|
"query": "label_values(namespace)",
|
|
"refresh": 1,
|
|
"regex": "",
|
|
"skipUrlSync": false,
|
|
"sort": 0,
|
|
"type": "query"
|
|
},
|
|
{
|
|
"allValue": ".+",
|
|
"current": {
|
|
"selected": false,
|
|
"text": "All",
|
|
"value": "$__all"
|
|
},
|
|
"datasource": {
|
|
"type": "victorialogs-datasource",
|
|
"uid": "${DS_VICTORIALOGS}"
|
|
},
|
|
"definition": "label_values(stream)",
|
|
"hide": 0,
|
|
"includeAll": true,
|
|
"multi": true,
|
|
"name": "stream",
|
|
"options": [],
|
|
"query": "label_values(stream)",
|
|
"refresh": 1,
|
|
"regex": "",
|
|
"skipUrlSync": false,
|
|
"sort": 0,
|
|
"type": "query"
|
|
},
|
|
{
|
|
"current": {
|
|
"selected": false,
|
|
"text": "VictoriaLogs",
|
|
"value": "VictoriaLogs"
|
|
},
|
|
"hide": 0,
|
|
"includeAll": false,
|
|
"label": "Datasource",
|
|
"multi": false,
|
|
"name": "DS_VICTORIALOGS",
|
|
"options": [],
|
|
"query": "victorialogs-datasource",
|
|
"queryValue": "VictoriaLogs",
|
|
"refresh": 1,
|
|
"regex": "",
|
|
"skipUrlSync": false,
|
|
"type": "datasource"
|
|
}
|
|
]
|
|
},
|
|
"time": {
|
|
"from": "now-6h",
|
|
"to": "now"
|
|
},
|
|
"timepicker": {},
|
|
"timezone": "",
|
|
"title": "Flux Logs",
|
|
"uid": "flux-logs",
|
|
"version": 3,
|
|
"weekStart": ""
|
|
}
|