Skip to content

Commit

Permalink
fix: update dashboard metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
dy0gu committed Nov 26, 2024
1 parent 432f702 commit 8e14028
Show file tree
Hide file tree
Showing 3 changed files with 105 additions and 131 deletions.
153 changes: 99 additions & 54 deletions grafana-logs-dashboard.json
Original file line number Diff line number Diff line change
@@ -1,79 +1,124 @@
{
"__inputs": [
{
"name": "DS_LOKI",
"label": "Loki",
"description": "Loki data source",
"type": "datasource",
"pluginId": "loki",
"pluginName": "Loki"
}
],
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "9.4.3"
},
{
"type": "panel",
"id": "logs",
"name": "Logs",
"version": ""
},
{
"type": "datasource",
"id": "loki",
"name": "Loki",
"version": "2.7.1"
}
],
"templating": {
"annotations": {
"list": [
{
"name": "container_name",
"type": "query",
"datasource": "${DS_LOKI}",
"query": "label_values({job=\"docker\"}, container_name)",
"refresh": 2,
"hide": 0,
"label": "Container Name",
"multi": true,
"includeAll": true,
"allValue": ".*"
"builtIn": 1,
"datasource": {
"type": "datasource",
"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,
"links": [],
"liveNow": false,
"panels": [
{
"type": "logs",
"title": "Logs for $container_name",
"datasource": {
"type": "loki",
"uid": "DS_LOKI"
"uid": "${datasource}"
},
"fieldConfig": {
"defaults": {},
"overrides": []
},
"targets": [
{
"expr": "{container_name=\"$container_name\"}",
"refId": "A"
}
],
"gridPos": {
"h": 9,
"h": 15,
"w": 24,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"showLabels": true,
"showTime": true,
"wrapLogMessage": true
},
"repeat": "container_name",
"repeatDirection": "h"
"repeatDirection": "h",
"targets": [
{
"datasource": {
"type": "loki",
"uid": "${datasource}"
},
"expr": "{container_name=~\"$container_name.+\"}",
"refId": "A"
}
],
"title": "$container_name",
"type": "logs"
}
],
"title": "Loki Docker Logs by Container",
"editable": true
"preload": false,
"refresh": "",
"schemaVersion": 40,
"tags": [
"containers"
],
"templating": {
"list": [
{
"allValue": ".*",
"current": {
"text": "All",
"value": "$__all"
},
"datasource": "${datasource}",
"includeAll": true,
"label": "Container",
"multi": true,
"name": "container_name",
"options": [],
"query": "label_values({job=\"docker\"}, container_name)",
"refresh": 2,
"type": "query"
},
{
"current": {
"text": "Loki",
"value": "P8E80F9AEF21F6940"
},
"label": "Datasource",
"name": "datasource",
"options": [],
"query": "loki",
"refresh": 1,
"regex": "",
"type": "datasource"
},
{
"baseFilters": [],
"datasource": {
"type": "loki",
"uid": "${datasource}"
},
"filters": [],
"name": "Filters",
"type": "adhoc"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "Logs",
"weekStart": ""
}
79 changes: 4 additions & 75 deletions grafana-metrics-dashboard.json
Original file line number Diff line number Diff line change
@@ -1,57 +1,7 @@
{
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "Prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
],
"__elements": {},
"__requires": [
{
"type": "panel",
"id": "bargauge",
"name": "Bar gauge",
"version": ""
},
{
"type": "panel",
"id": "gauge",
"name": "Gauge",
"version": ""
},
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "9.4.3"
},
{
"type": "datasource",
"id": "prometheus",
"name": "Prometheus",
"version": "1.0.0"
},
{
"type": "panel",
"id": "stat",
"name": "Stat",
"version": ""
},
{
"type": "panel",
"id": "timeseries",
"name": "Time series",
"version": ""
}
],
"annotations": {
"list": [
{
"$$hashKey": "object:1058",
"builtIn": 1,
"datasource": {
"type": "datasource",
Expand All @@ -73,27 +23,8 @@
},
"editable": true,
"fiscalYearStartMonth": 0,
"gnetId": 1860,
"graphTooltip": 1,
"id": null,
"links": [
{
"icon": "external link",
"tags": [],
"targetBlank": true,
"title": "GitHub",
"type": "link",
"url": "/~https://github.com/rfmoz/grafana-dashboards"
},
{
"icon": "external link",
"tags": [],
"targetBlank": true,
"title": "Grafana",
"type": "link",
"url": "https://grafana.com/grafana/dashboards/1860"
}
],
"links": [],
"liveNow": false,
"panels": [
{
Expand Down Expand Up @@ -23755,7 +23686,7 @@
"refId": "A"
}
],
"title": "Node Exporter",
"title": "Metrics",
"type": "row"
}
],
Expand Down Expand Up @@ -23892,8 +23823,6 @@
]
},
"timezone": "browser",
"title": "Node Exporter Full",
"uid": "rYdddlPWk",
"version": 92,
"title": "Metrics",
"weekStart": ""
}
}
4 changes: 2 additions & 2 deletions loki.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ common:
kvstore:
store: inmemory
replication_factor: 1
path_prefix: /tmp/loki
path_prefix: /loki

schema_config:
configs:
Expand All @@ -22,4 +22,4 @@ schema_config:

storage_config:
filesystem:
directory: /tmp/loki/chunks
directory: /loki/chunks

0 comments on commit 8e14028

Please sign in to comment.