pihole-exporter/grafana/dashboard-influxdb2.json
2023-07-26 03:15:50 -04:00

1784 lines
No EOL
48 KiB
JSON

{
"__inputs": [
{
"name": "DS_INFLUXDB_2",
"label": "InfluxDB 2",
"description": "InfluxDB 2 (Flux)",
"type": "datasource",
"pluginId": "influxdb",
"pluginName": "InfluxDB"
}
],
"__elements": {},
"__requires": [
{
"type": "panel",
"id": "gauge",
"name": "Gauge",
"version": ""
},
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "9.1.6"
},
{
"type": "datasource",
"id": "influxdb",
"name": "InfluxDB",
"version": "1.0.0"
},
{
"type": "panel",
"id": "piechart",
"name": "Pie chart",
"version": ""
},
{
"type": "panel",
"id": "stat",
"name": "Stat",
"version": ""
},
{
"type": "panel",
"id": "table",
"name": "Table",
"version": ""
},
{
"type": "panel",
"id": "timeseries",
"name": "Time series",
"version": ""
}
],
"annotations": {
"list": [
{
"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"
}
]
},
"description": "This is a Pi-hole dashboard when using the https://github.com/eko/pihole-exporter Prometheus exporter with an Influxdb2 Datasource",
"editable": true,
"fiscalYearStartMonth": 0,
"gnetId": 17094,
"graphTooltip": 0,
"id": null,
"links": [],
"liveNow": false,
"panels": [
{
"collapsed": false,
"datasource": {
"type": "influxdb",
"uid": "z2ph7GE7z"
},
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 0
},
"id": 60,
"panels": [],
"targets": [
{
"datasource": {
"type": "influxdb",
"uid": "z2ph7GE7z"
},
"refId": "A"
}
],
"title": "🥧🕳️ Pi-hole",
"type": "row"
},
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB_2}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [
{
"options": {
"0": {
"text": "Disabled"
},
"1": {
"text": "Enabled"
}
},
"type": "value"
}
],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "#d44a3a",
"value": null
},
{
"color": "rgba(237, 129, 40, 0.89)",
"value": 0
},
{
"color": "#299c46",
"value": 1
}
]
},
"unit": "none"
},
"overrides": []
},
"gridPos": {
"h": 3,
"w": 4,
"x": 0,
"y": 1
},
"id": 84,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "background",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "9.1.6",
"targets": [
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB_2}"
},
"query": "from(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"${measurement}\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"pihole_status\")\r\n |> filter(fn: (r) => r[\"hostname\"] == \"${server}\")\r\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\r\n |> yield(name: \"mean\")",
"refId": "A"
}
],
"title": "Status",
"type": "stat"
},
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB_2}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"decimals": 2,
"mappings": [],
"max": 100,
"min": 0,
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"index": 0,
"value": null
},
{
"color": "#EAB839",
"index": 1,
"value": 40
},
{
"color": "red",
"index": 2,
"value": 80
}
]
},
"unit": "percent"
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 4,
"x": 4,
"y": 1
},
"id": 92,
"links": [],
"options": {
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true
},
"pluginVersion": "9.1.6",
"targets": [
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB_2}"
},
"expr": "pihole_ads_percentage_today",
"format": "time_series",
"interval": "",
"intervalFactor": 1,
"query": "from(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"${measurement}\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"pihole_ads_percentage_today\")\r\n |> filter(fn: (r) => r[\"hostname\"] == \"${server}\")\r\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\r\n |> yield(name: \"mean\")",
"refId": "A"
}
],
"title": "% ads blocked",
"transparent": true,
"type": "gauge"
},
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB_2}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
}
},
"decimals": 1,
"mappings": [],
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 4,
"x": 8,
"y": 1
},
"id": 70,
"links": [],
"maxDataPoints": 3,
"options": {
"displayLabels": [
"percent"
],
"legend": {
"calcs": [],
"displayMode": "table",
"placement": "right",
"showLegend": false,
"values": [
"value"
]
},
"pieType": "pie",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"tooltip": {
"mode": "multi",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB_2}"
},
"expr": "pihole_top_queries",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "{{ domain }}",
"query": "from(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"${measurement}\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"pihole_top_queries\")\r\n |> filter(fn: (r) => r[\"hostname\"] == \"${server}\")\r\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\r\n |> map(fn: (r) => ({_value:r._value, _time:r._time, _field:r.domain}))\r\n |> yield(name: \"mean\")\r\n",
"refId": "A"
}
],
"title": "Top queries by domain",
"transparent": true,
"type": "piechart"
},
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB_2}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
}
},
"decimals": 1,
"mappings": [],
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 4,
"x": 12,
"y": 1
},
"id": 93,
"links": [],
"maxDataPoints": 3,
"options": {
"displayLabels": [
"percent"
],
"legend": {
"calcs": [],
"displayMode": "table",
"placement": "right",
"showLegend": false,
"values": [
"value"
]
},
"pieType": "pie",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"tooltip": {
"mode": "multi",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB_2}"
},
"expr": "pihole_top_queries",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "{{ domain }}",
"query": "from(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"${measurement}\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"pihole_top_sources\")\r\n |> filter(fn: (r) => r[\"hostname\"] == \"${server}\")\r\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\r\n |> map(fn: (r) => ({_value:r._value, _time:r._time, _field:r.source}))\r\n |> yield(name: \"mean\")\r\n",
"refId": "A"
}
],
"title": "Top clients",
"transparent": true,
"type": "piechart"
},
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB_2}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
}
},
"decimals": 1,
"mappings": [],
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 4,
"x": 16,
"y": 1
},
"id": 86,
"links": [],
"maxDataPoints": 3,
"options": {
"displayLabels": [
"name",
"percent"
],
"legend": {
"calcs": [],
"displayMode": "table",
"placement": "right",
"showLegend": false,
"values": [
"percent"
]
},
"pieType": "pie",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"tooltip": {
"mode": "multi",
"sort": "none"
}
},
"pluginVersion": "6.1.4",
"targets": [
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB_2}"
},
"expr": "pihole_reply",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "{{ type }}",
"query": "from(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"${measurement}\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"pihole_reply\")\r\n |> filter(fn: (r) => r[\"hostname\"] == \"${server}\")\r\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\r\n |> map(fn: (r) => ({_value:r._value, _time:r._time, _field:r.type}))\r\n |> yield(name: \"mean\")\r\n",
"refId": "A"
}
],
"title": "Replies by type",
"transparent": true,
"type": "piechart"
},
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB_2}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
}
},
"decimals": 1,
"mappings": [],
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 8,
"w": 4,
"x": 20,
"y": 1
},
"id": 72,
"links": [],
"maxDataPoints": 3,
"options": {
"displayLabels": [
"percent"
],
"legend": {
"calcs": [],
"displayMode": "table",
"placement": "right",
"showLegend": false,
"values": [
"value"
]
},
"pieType": "pie",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB_2}"
},
"expr": "pihole_top_ads",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "{{ domain }}",
"query": "from(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"${measurement}\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"pihole_top_ads\")\r\n |> filter(fn: (r) => r[\"hostname\"] == \"${server}\")\r\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\r\n |> map(fn: (r) => ({_value:r._value, _time:r._time, _field:r.domain}))\r\n |> yield(name: \"mean\")\r\n",
"refId": "A"
}
],
"title": "Top ads by domain",
"transparent": true,
"type": "piechart"
},
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB_2}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"decimals": 1,
"mappings": [
{
"options": {
"match": "null",
"result": {
"text": "N/A"
}
},
"type": "special"
}
],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 3,
"w": 4,
"x": 0,
"y": 4
},
"id": 80,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "none",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"mean"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "9.1.6",
"targets": [
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB_2}"
},
"expr": "pihole_domains_being_blocked",
"format": "time_series",
"intervalFactor": 1,
"query": "from(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"${measurement}\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"pihole_domains_being_blocked\")\r\n |> filter(fn: (r) => r[\"hostname\"] == \"${server}\")\r\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\r\n |> yield(name: \"mean\")",
"refId": "A"
}
],
"title": "Domains being blocked",
"transparent": true,
"type": "stat"
},
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB_2}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [
{
"options": {
"match": "null",
"result": {
"text": "N/A"
}
},
"type": "special"
}
],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "none"
},
"overrides": []
},
"gridPos": {
"h": 3,
"w": 4,
"x": 0,
"y": 7
},
"id": 82,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "none",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"mean"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "9.1.6",
"targets": [
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB_2}"
},
"expr": "pihole_unique_domains",
"format": "time_series",
"intervalFactor": 1,
"query": "from(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"${measurement}\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"pihole_unique_domains\")\r\n |> filter(fn: (r) => r[\"hostname\"] == \"${server}\")\r\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\r\n |> yield(name: \"mean\")",
"refId": "A"
}
],
"title": "Unique domains",
"transparent": true,
"type": "stat"
},
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB_2}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [
{
"options": {
"match": "null",
"result": {
"text": "N/A"
}
},
"type": "special"
}
],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "none"
},
"overrides": []
},
"gridPos": {
"h": 3,
"w": 4,
"x": 4,
"y": 7
},
"id": 94,
"links": [],
"maxDataPoints": 100,
"options": {
"colorMode": "none",
"graphMode": "none",
"justifyMode": "auto",
"orientation": "horizontal",
"reduceOptions": {
"calcs": [
"mean"
],
"fields": "",
"values": false
},
"textMode": "auto"
},
"pluginVersion": "9.1.6",
"targets": [
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB_2}"
},
"expr": "pihole_unique_domains",
"format": "time_series",
"intervalFactor": 1,
"query": "from(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"${measurement}\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"pihole_unique_clients\")\r\n |> filter(fn: (r) => r[\"hostname\"] == \"${server}\")\r\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\r\n |> yield(name: \"mean\")",
"refId": "A"
}
],
"title": "Unique clients",
"transparent": true,
"type": "stat"
},
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB_2}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "normal"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 8,
"x": 8,
"y": 9
},
"id": 68,
"links": [],
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "none"
}
},
"pluginVersion": "9.1.6",
"targets": [
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB_2}"
},
"expr": "pihole_queries_cached",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "Queries cached",
"query": "from(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"${measurement}\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"pihole_ads_blocked_today\")\r\n |> filter(fn: (r) => r[\"hostname\"] == \"${server}\")\r\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\r\n |> map(fn: (r) => ({_value:r._value, _time:r._time, _field: \"Queries cached\" }))\r\n |> yield(name: \"mean\")",
"refId": "A"
},
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB_2}"
},
"expr": "pihole_queries_forwarded",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "Queries forwarded",
"query": "from(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"${measurement}\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"pihole_queries_forwarded\")\r\n |> filter(fn: (r) => r[\"hostname\"] == \"${server}\")\r\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\r\n |> map(fn: (r) => ({_value:r._value, _time:r._time, _field: \"Queries forwarded\" }))\r\n |> yield(name: \"mean\")",
"refId": "B"
}
],
"title": "Queries cached/forwarded",
"transparent": true,
"type": "timeseries"
},
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB_2}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "percent"
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 8,
"x": 16,
"y": 9
},
"id": 78,
"links": [],
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "none"
}
},
"pluginVersion": "9.1.6",
"targets": [
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB_2}"
},
"expr": "pihole_querytypes",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "{{ type }}",
"query": "from(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"${measurement}\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"pihole_querytypes\")\r\n |> filter(fn: (r) => r[\"hostname\"] == \"${server}\")\r\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\r\n |> map(fn: (r) => ({_value:r._value, _time:r._time, _field:r.type }))\r\n |> yield(name: \"mean\")",
"refId": "A"
}
],
"title": "DNS Query types",
"transparent": true,
"type": "timeseries"
},
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB_2}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"decimals": 1,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "pihole"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "super-light-blue",
"mode": "fixed"
}
}
]
}
]
},
"gridPos": {
"h": 5,
"w": 8,
"x": 0,
"y": 10
},
"id": 66,
"links": [],
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": false
},
"tooltip": {
"mode": "multi",
"sort": "none"
}
},
"pluginVersion": "9.1.6",
"targets": [
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB_2}"
},
"expr": "pihole_dns_queries_all_types",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "{{ job }}",
"query": "from(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"${measurement}\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"pihole_dns_queries_all_types\")\r\n |> filter(fn: (r) => r[\"hostname\"] == \"${server}\")\r\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\r\n |> map(fn: (r) => ({_value:r._value, _time:r._time, _field: \"Count\" }))\r\n |> yield(name: \"mean\")",
"refId": "A"
}
],
"title": "DNS queries all of types",
"transparent": true,
"type": "timeseries"
},
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB_2}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "pihole"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "light-red",
"mode": "fixed"
}
}
]
}
]
},
"gridPos": {
"h": 6,
"w": 8,
"x": 0,
"y": 15
},
"id": 62,
"links": [],
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": false
},
"tooltip": {
"mode": "multi",
"sort": "none"
}
},
"pluginVersion": "9.1.6",
"targets": [
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB_2}"
},
"expr": "pihole_ads_blocked_today",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "{{ job }}",
"query": "from(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"${measurement}\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"pihole_ads_blocked_today\")\r\n |> filter(fn: (r) => r[\"hostname\"] == \"${server}\")\r\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\r\n |> map(fn: (r) => ({_value:r._value, _time:r._time, _field: \"Count\" }))\r\n |> yield(name: \"mean\")\r\n",
"refId": "A"
}
],
"title": "Ads blocked (today)",
"transparent": true,
"type": "timeseries"
},
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB_2}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"displayMode": "auto",
"inspect": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Time"
},
"properties": [
{
"id": "unit",
"value": "short"
},
{
"id": "decimals",
"value": 2
},
{
"id": "unit",
"value": "time: YYYY-MM-DD HH:mm:ss"
},
{
"id": "custom.align"
}
]
}
]
},
"gridPos": {
"h": 5,
"w": 8,
"x": 8,
"y": 15
},
"id": 74,
"links": [],
"options": {
"footer": {
"enablePagination": false,
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"showHeader": true,
"sortBy": [
{
"desc": true,
"displayName": "Value"
}
]
},
"pluginVersion": "9.1.6",
"targets": [
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB_2}"
},
"expr": "pihole_top_queries",
"format": "time_series",
"instant": false,
"interval": "",
"intervalFactor": 1,
"legendFormat": "{{ domain }}",
"query": "from(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"${measurement}\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"pihole_top_queries\")\r\n |> filter(fn: (r) => r[\"hostname\"] == \"${server}\")\r\n |> last()\r\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)\r\n |> map(fn: (r) => ({_value:r._value, _time:r._time, _field:r.domain}))\r\n |> yield(name: \"last\")\r\n",
"refId": "A"
}
],
"title": "Top queries",
"transformations": [
{
"id": "seriesToRows",
"options": {
"reducers": []
}
}
],
"transparent": true,
"type": "table"
},
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB_2}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"displayMode": "auto",
"inspect": false
},
"decimals": 2,
"displayName": "",
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "short"
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "Time"
},
"properties": [
{
"id": "displayName",
"value": "Time"
},
{
"id": "unit",
"value": "time: YYYY-MM-DD HH:mm:ss"
},
{
"id": "custom.align"
}
]
}
]
},
"gridPos": {
"h": 5,
"w": 8,
"x": 16,
"y": 15
},
"id": 90,
"links": [],
"options": {
"footer": {
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"showHeader": true,
"sortBy": [
{
"desc": true,
"displayName": "Value"
}
]
},
"pluginVersion": "9.1.6",
"targets": [
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB_2}"
},
"expr": "pihole_top_ads",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "{{ domain }}",
"query": "from(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"${measurement}\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"pihole_top_ads\")\r\n |> filter(fn: (r) => r[\"hostname\"] == \"${server}\")\r\n |> last()\r\n |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)\r\n |> map(fn: (r) => ({_value:r._value, _time:r._time, _field:r.domain}))\r\n |> yield(name: \"last\")\r\n",
"refId": "A"
}
],
"title": "Top ads domains",
"transformations": [
{
"id": "seriesToRows",
"options": {
"reducers": []
}
}
],
"transparent": true,
"type": "table"
},
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB_2}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "percent"
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 16,
"x": 8,
"y": 20
},
"id": 88,
"links": [],
"options": {
"legend": {
"calcs": [
"lastNotNull"
],
"displayMode": "table",
"placement": "right",
"showLegend": true,
"sortBy": "Last *",
"sortDesc": true
},
"tooltip": {
"mode": "multi",
"sort": "desc"
}
},
"pluginVersion": "9.1.6",
"targets": [
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB_2}"
},
"expr": "pihole_forward_destinations",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "{{ destination }}",
"query": "from(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"${measurement}\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"pihole_forward_destinations\")\r\n |> filter(fn: (r) => r[\"hostname\"] == \"${server}\")\r\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\r\n |> map(fn: (r) => ({_value:r._value, _time:r._time, _field:r.destination}))\r\n |> yield(name: \"mean\")",
"refId": "A"
}
],
"title": "Forward destinations",
"transparent": true,
"type": "timeseries"
},
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB_2}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "percent"
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "pihole"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "super-light-red",
"mode": "fixed"
}
}
]
}
]
},
"gridPos": {
"h": 5,
"w": 8,
"x": 0,
"y": 21
},
"id": 64,
"links": [],
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "multi",
"sort": "none"
}
},
"pluginVersion": "9.1.6",
"targets": [
{
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB_2}"
},
"expr": "pihole_ads_percentage_today",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "{{ job }}",
"query": "from(bucket: \"${bucket}\")\r\n |> range(start: v.timeRangeStart, stop: v.timeRangeStop)\r\n |> filter(fn: (r) => r[\"_measurement\"] == \"${measurement}\")\r\n |> filter(fn: (r) => r[\"_field\"] == \"pihole_ads_percentage_today\")\r\n |> filter(fn: (r) => r[\"hostname\"] == \"${server}\")\r\n |> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)\r\n |> map(fn: (r) => ({_value:r._value, _time:r._time, _field: \"Count\" }))\r\n |> yield(name: \"mean\")\r\n",
"refId": "A"
}
],
"title": "% of ads blocked",
"transparent": true,
"type": "timeseries"
}
],
"refresh": "10s",
"schemaVersion": 37,
"style": "dark",
"tags": [],
"templating": {
"list": [
{
"current": {},
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB_2}"
},
"definition": "buckets()",
"hide": 0,
"includeAll": false,
"label": "Bucket",
"multi": false,
"name": "bucket",
"options": [],
"query": "buckets()",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"type": "query"
},
{
"current": {},
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB_2}"
},
"definition": "import \"influxdata/influxdb/v1\"\r\nv1.measurements(bucket: \"${bucket}\")",
"hide": 0,
"includeAll": false,
"label": "Measurement",
"multi": false,
"name": "measurement",
"options": [],
"query": "import \"influxdata/influxdb/v1\"\r\nv1.measurements(bucket: \"${bucket}\")",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"type": "query"
},
{
"current": {},
"datasource": {
"type": "influxdb",
"uid": "${DS_INFLUXDB_2}"
},
"definition": "import \"influxdata/influxdb/v1\"\r\nv1.tagValues(\r\n bucket: \"${bucket}\",\r\n tag: \"hostname\",\r\n predicate: (r) => true,\r\n start: -1d\r\n)",
"hide": 0,
"includeAll": false,
"label": "Server",
"multi": false,
"name": "server",
"options": [],
"query": "import \"influxdata/influxdb/v1\"\r\nv1.tagValues(\r\n bucket: \"${bucket}\",\r\n tag: \"hostname\",\r\n predicate: (r) => true,\r\n start: -1d\r\n)",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"sort": 0,
"type": "query"
}
]
},
"time": {
"from": "now-30m",
"to": "now"
},
"timepicker": {
"hidden": false,
"nowDelay": "",
"refresh_intervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
],
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "",
"title": "Pi-hole Exporter Influxdb 2 (Flux)",
"uid": "KILVhlozd",
"version": 1,
"weekStart": ""
}