Skip to content

Commit

Permalink
improved dashboard templating
Browse files Browse the repository at this point in the history
  • Loading branch information
raylas committed Nov 30, 2022
1 parent f914867 commit bfc8000
Showing 1 changed file with 44 additions and 37 deletions.
81 changes: 44 additions & 37 deletions grafana/dashboards/nextdns.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
"graphTooltip": 0,
"id": 2,
"links": [],
"liveNow": false,
"liveNow": true,
"panels": [
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
"uid": "${source}"
},
"fieldConfig": {
"defaults": {
Expand All @@ -40,8 +40,6 @@
"mode": "fixed"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
Expand Down Expand Up @@ -109,7 +107,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
"uid": "${source}"
},
"editorMode": "code",
"expr": "nextdns_queries_total{profile=\"$profile\"}",
Expand All @@ -124,7 +122,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
"uid": "${source}"
},
"description": "",
"fieldConfig": {
Expand Down Expand Up @@ -174,11 +172,11 @@
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
"uid": "${source}"
},
"editorMode": "code",
"expr": "nextdns_blocked_queries{profile=\"$profile\"}",
"legendFormat": "{{domain}}",
"legendFormat": "{{root}}",
"range": true,
"refId": "domains"
}
Expand All @@ -189,7 +187,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
"uid": "${source}"
},
"description": "",
"fieldConfig": {
Expand Down Expand Up @@ -238,7 +236,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
"uid": "${source}"
},
"editorMode": "code",
"expr": "nextdns_device_queries{profile=\"$profile\"}",
Expand All @@ -253,7 +251,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
"uid": "${source}"
},
"fieldConfig": {
"defaults": {
Expand Down Expand Up @@ -298,12 +296,12 @@
"showThresholdLabels": false,
"showThresholdMarkers": false
},
"pluginVersion": "9.2.6",
"pluginVersion": "9.0.2",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
"uid": "${source}"
},
"editorMode": "code",
"expr": "sum(increase(nextdns_blocked_queries_total{profile=\"$profile\"}[$__range]))",
Expand All @@ -315,7 +313,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
"uid": "${source}"
},
"editorMode": "code",
"expr": "sum(increase(nextdns_queries_total{profile=\"$profile\"}[$__range]))",
Expand Down Expand Up @@ -364,7 +362,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
"uid": "${source}"
},
"fieldConfig": {
"defaults": {
Expand Down Expand Up @@ -411,12 +409,12 @@
},
"textMode": "auto"
},
"pluginVersion": "9.2.6",
"pluginVersion": "9.0.2",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
"uid": "${source}"
},
"editorMode": "code",
"expr": "sum(increase(nextdns_queries_total{profile=\"$profile\"}[$__range]))",
Expand All @@ -432,16 +430,14 @@
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
"uid": "${source}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
Expand Down Expand Up @@ -509,7 +505,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
"uid": "${source}"
},
"editorMode": "code",
"expr": "nextdns_type_queries{profile=\"$profile\"}",
Expand All @@ -524,7 +520,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
"uid": "${source}"
},
"fieldConfig": {
"defaults": {
Expand All @@ -533,8 +529,6 @@
"mode": "fixed"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
Expand Down Expand Up @@ -602,7 +596,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
"uid": "${source}"
},
"editorMode": "code",
"expr": "nextdns_blocked_queries_total{profile=\"$profile\"}",
Expand All @@ -617,16 +611,14 @@
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
"uid": "${source}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
Expand Down Expand Up @@ -694,7 +686,7 @@
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
"uid": "${source}"
},
"editorMode": "code",
"expr": "nextdns_ip_version_queries{profile=\"$profile\"}",
Expand All @@ -707,7 +699,7 @@
"type": "timeseries"
}
],
"schemaVersion": 37,
"schemaVersion": 36,
"style": "dark",
"tags": [
"nextdns"
Expand All @@ -717,14 +709,29 @@
{
"current": {
"selected": true,
"text": "e6e9b2",
"value": "e6e9b2"
"text": "Prometheus",
"value": "Prometheus"
},
"hide": 0,
"includeAll": false,
"multi": false,
"name": "source",
"options": [],
"query": "prometheus",
"queryValue": "",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"type": "datasource"
},
{
"current": {
"selected": false
},
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
"type": "prometheus"
},
"definition": "label_values(profile)",
"definition": "",
"hide": 0,
"includeAll": false,
"multi": false,
Expand All @@ -743,13 +750,13 @@
]
},
"time": {
"from": "now-15m",
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "NextDNS",
"uid": "MwiWGgFVz",
"version": 5,
"version": 12,
"weekStart": ""
}

0 comments on commit bfc8000

Please sign in to comment.