Grafana dashboard: Pi-hole UI
Description: Watch either a single Pi-hole system or combine the statics of several in a single pane.

This dashboard was built around the pihole-exporter https://github.com/eko/pihole-exporter.

With this dashboard you can see the statics and status of either a single Pi-hole instance or combine statistics across multiple Pi-hole servers.

PiholeDevices is a variable you will need to update with the total number of Pi-hole systems you have in Prometheus.  Setting this number helps to identify when a Pi-hole server in your environment is either down or not being scrapped.  You should be prompted to enter the number of Pi-hole devices when you import the dashboard.

QueryTypes allows you to tune the Query Types panel to only show you the types you are interested in.  It’s a simple exclude so if you don’t care about things like MX records you can simply put that in the Regex and it won’t show up on the dashboard.

If you currently don’t have any data in Prometheus please note that it may take 20 minutes before you see anything in some of the graphs once the data starts coming in.  This is because it uses a delta between the previous 10 minute poll and the most recent poll to calculate the data.

Pi-hole Status pain will provide additional information if there is an issue with one of your Pi-hole servers.  If you put a device into maintenance or a server becomes unreachable an additional box will show up indicating the number of issues.  If a new device is added but you don’t update the PiholeDevices variable you will also get a box indicating you have more Pi-hole devices than the variable is set to.  (see the image for reference)

Average of Domains in Blocklists adds the value of all servers in the environment and then divides that sum by the number of Pi-hole devices selected to get an average.  If all your Pi-hole server have the same number of domains in their blocklists then this shouldn’t be a problem as the average will match.    

Pi-hole Server Information provides a list of all the Pi-hole servers regardless of the JobName or device you have selected at the top.


{
  "__inputs": [
    {
      "name": "DS_PROMETHEUS",
      "label": "Prometheus",
      "description": "",
      "type": "datasource",
      "pluginId": "prometheus",
      "pluginName": "Prometheus"
    },
    {
      "name": "VAR_PIHOLEDEVICES",
      "type": "constant",
      "label": "PiholeDevices",
      "value": "3",
      "description": ""
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "7.5.7"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": ""
    },
    {
      "type": "panel",
      "id": "piechart",
      "name": "Pie chart v2",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "prometheus",
      "name": "Prometheus",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "stat",
      "name": "Stat",
      "version": ""
    },
    {
      "type": "panel",
      "id": "table",
      "name": "Table",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "description": "Watch either a single Pi-hole system or combine the statics of several in a single pane.",
  "editable": true,
  "gnetId": 14475,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1621640193849,
  "links": [
    {
      "asDropdown": true,
      "icon": "external link",
      "includeVars": false,
      "keepTime": true,
      "tags": [
        "pihole"
      ],
      "targetBlank": false,
      "title": "Pi-hole",
      "tooltip": "",
      "type": "dashboards",
      "url": ""
    }
  ],
  "panels": [
    {
      "collapsed": false,
      "datasource": null,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 9,
      "panels": [],
      "repeat": null,
      "title": "Pi-hole - $Device",
      "type": "row"
    },
    {
      "datasource": null,
      "description": "Update the PiholeDevices variable with the total number of Pi-hole systems you have in Prometheus regardless of the Job they are assigned to.  This is to help identify a Pi-hole across the entire fleet of Pi-hole’s.  It is meant to give you an idea that there is a problem regardless of which device it is or the Prometheus Job it is in.\n\n“Total Pi-hole's” is the number of devices you are reporting in Prometheus.  This is a number that you must manually enter in the PiholeDevices variable.  Count every Pi-hole you have in Prometheus regardless of the Job it is in.\n\n“Pi-hole's Down” indicates that a Pi-hole is either down or not being scrapped in either this Job or any other Job.\n\n“Pi-hole's Disabled” represents a Pi-hole where it has been disabled but is still online.\n\n“Update Variable” indicates that you are scrapping more devices than you have entered in the PiholeDevices variable indicating a new device has come online.  Update the PiholeDevices variable to properly reflect the number of devices you expect to be reporting on.\n",
      "fieldConfig": {
        "defaults": {
          "color": {
            "fixedColor": "dark-purple",
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "dark-green",
                "value": null
              }
            ]
          },
          "unit": "locale"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Value"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "dark-blue",
                  "mode": "fixed"
                }
              },
              {
                "id": "displayName",
                "value": "Total Pi-hole's"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Pi-hole's Down  :"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "dark-red",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Pi-hole's Disabled  :"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "yellow",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Update Variable  :"
            },
            "properties": [
              {
                "id": "color",
                "value": {
                  "fixedColor": "yellow",
                  "mode": "fixed"
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 2,
        "w": 4,
        "x": 0,
        "y": 1
      },
      "id": 75,
      "options": {
        "colorMode": "background",
        "graphMode": "none",
        "justifyMode": "center",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "value_and_name"
      },
      "pluginVersion": "7.5.7",
      "targets": [
        {
          "exemplar": true,
          "expr": "$PiholeDevices",
          "format": "time_series",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "C"
        },
        {
          "exemplar": true,
          "expr": "$PiholeDevices-count(pihole_status) >0",
          "format": "time_series",
          "instant": true,
          "interval": "",
          "legendFormat": "Pi-hole's Down  :",
          "refId": "A"
        },
        {
          "exemplar": true,
          "expr": "count(pihole_status==0) >0",
          "format": "time_series",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "Pi-hole's Disabled  :",
          "refId": "B"
        },
        {
          "exemplar": true,
          "expr": "count(pihole_status) - $PiholeDevices >0",
          "format": "time_series",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "Update Variable  :",
          "refId": "D"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Pi-hole Status",
      "type": "stat"
    },
    {
      "datasource": null,
      "fieldConfig": {
        "defaults": {
          "color": {
            "fixedColor": "rgb(58, 167, 91)",
            "mode": "fixed"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "locale"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 2,
        "w": 5,
        "x": 4,
        "y": 1
      },
      "id": 4,
      "options": {
        "colorMode": "background",
        "graphMode": "none",
        "justifyMode": "center",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {
          "valueSize": 30
        },
        "textMode": "value"
      },
      "pluginVersion": "7.5.7",
      "targets": [
        {
          "exemplar": true,
          "expr": "sum(pihole_dns_queries_today{job=~'$JobName',instance=~'$Device'})",
          "format": "time_series",
          "instant": true,
          "interval": "",
          "legendFormat": "Total Queries",
          "refId": "A"
        }
      ],
      "timeFrom": "24h",
      "timeShift": null,
      "title": "Total Queries",
      "type": "stat"
    },
    {
      "datasource": null,
      "fieldConfig": {
        "defaults": {
          "color": {
            "fixedColor": "rgb(63, 192, 239)",
            "mode": "fixed"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "locale"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 2,
        "w": 5,
        "x": 9,
        "y": 1
      },
      "id": 6,
      "options": {
        "colorMode": "background",
        "graphMode": "none",
        "justifyMode": "center",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {
          "valueSize": 30
        },
        "textMode": "value"
      },
      "pluginVersion": "7.5.7",
      "targets": [
        {
          "exemplar": true,
          "expr": "sum(pihole_ads_blocked_today{job=~'$JobName',instance=~'$Device'})",
          "format": "time_series",
          "instant": true,
          "interval": "",
          "legendFormat": "Total Queries",
          "refId": "A"
        }
      ],
      "timeFrom": "24h",
      "timeShift": null,
      "title": "Queries Blocked",
      "type": "stat"
    },
    {
      "datasource": null,
      "fieldConfig": {
        "defaults": {
          "color": {
            "fixedColor": "rgb(237, 156, 16)",
            "mode": "fixed"
          },
          "decimals": 2,
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "percentunit"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 2,
        "w": 5,
        "x": 14,
        "y": 1
      },
      "id": 5,
      "options": {
        "colorMode": "background",
        "graphMode": "none",
        "justifyMode": "center",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {
          "valueSize": 30
        },
        "textMode": "value"
      },
      "pluginVersion": "7.5.7",
      "targets": [
        {
          "exemplar": true,
          "expr": "sum(pihole_ads_blocked_today{job=~'$JobName',instance=~'$Device'}) / sum(pihole_dns_queries_today{job=~'$JobName',instance=~'$Device'})",
          "format": "time_series",
          "instant": true,
          "interval": "",
          "legendFormat": "Total Queries",
          "refId": "A"
        }
      ],
      "timeFrom": "24h",
      "timeShift": null,
      "title": "Percent Blocked",
      "type": "stat"
    },
    {
      "datasource": null,
      "description": "This takes an average of all domains listed the Pihole servers you have selected.  If all your servers have the same number of blocked domains then this number should match.  If however you run 2 pihole servers where one server has 50 blocked domains and a second server has 100 blocked domains then it will show 75 (50+100)/2.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "fixedColor": "rgb(212, 73, 56)",
            "mode": "fixed"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "locale"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 2,
        "w": 5,
        "x": 19,
        "y": 1
      },
      "id": 7,
      "options": {
        "colorMode": "background",
        "graphMode": "none",
        "justifyMode": "center",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {
          "valueSize": 30
        },
        "textMode": "value"
      },
      "pluginVersion": "7.5.7",
      "targets": [
        {
          "exemplar": true,
          "expr": "avg(pihole_domains_being_blocked{job=~'$JobName',instance=~'$Device'})",
          "format": "time_series",
          "instant": true,
          "interval": "",
          "legendFormat": "Total Queries",
          "refId": "A"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Average of Domains in Blocklists",
      "type": "stat"
    },
    {
      "aliasColors": {},
      "bars": true,
      "dashLength": 10,
      "dashes": false,
      "datasource": null,
      "description": "Because this graph does a delta between the current and previous 10 minutes it will take 20 minutes before you start seeing data.",
      "fieldConfig": {
        "defaults": {},
        "overrides": []
      },
      "fill": 0,
      "fillGradient": 0,
      "gridPos": {
        "h": 7,
        "w": 24,
        "x": 0,
        "y": 3
      },
      "hiddenSeries": false,
      "hideTimeOverride": false,
      "id": 93,
      "interval": "10m",
      "legend": {
        "alignAsTable": false,
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "rightSide": false,
        "show": false,
        "total": false,
        "values": false
      },
      "lines": false,
      "linewidth": 1,
      "nullPointMode": "null as zero",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "7.5.7",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "$$hashKey": "object:229",
          "alias": "Permitted",
          "color": "rgb(64, 169, 96)"
        },
        {
          "$$hashKey": "object:328",
          "alias": "Blocked",
          "color": "rgb(138, 138, 138)"
        }
      ],
      "spaceLength": 10,
      "stack": true,
      "steppedLine": false,
      "targets": [
        {
          "exemplar": true,
          "expr": "sum(round(delta(pihole_ads_blocked_today{job=~'$JobName',instance=~'$Device'}[10m])))",
          "format": "time_series",
          "instant": false,
          "interval": "",
          "intervalFactor": 1,
          "legendFormat": "Blocked",
          "refId": "A"
        },
        {
          "exemplar": true,
          "expr": "sum(round(delta(pihole_queries_forwarded{job=~'$JobName',instance=~'$Device'}[10m])))",
          "format": "time_series",
          "hide": false,
          "instant": false,
          "interval": "",
          "legendFormat": "Permitted",
          "refId": "B"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Total queries",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:238",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": "0",
          "show": true
        },
        {
          "$$hashKey": "object:239",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {},
      "bars": true,
      "dashLength": 10,
      "dashes": false,
      "datasource": null,
      "description": "Because this graph does a delta between the current and previous 10 minutes it will take 20 minutes before you start seeing data.",
      "fieldConfig": {
        "defaults": {},
        "overrides": []
      },
      "fill": 0,
      "fillGradient": 0,
      "gridPos": {
        "h": 7,
        "w": 24,
        "x": 0,
        "y": 10
      },
      "hiddenSeries": false,
      "hideTimeOverride": false,
      "id": 78,
      "interval": "10m",
      "legend": {
        "alignAsTable": false,
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "rightSide": false,
        "show": false,
        "total": false,
        "values": false
      },
      "lines": false,
      "linewidth": 1,
      "nullPointMode": "null as zero",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "7.5.7",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "$$hashKey": "object:229",
          "alias": "Activity",
          "color": "rgb(236, 104, 83)"
        }
      ],
      "spaceLength": 10,
      "stack": true,
      "steppedLine": false,
      "targets": [
        {
          "exemplar": true,
          "expr": "sum(round(delta(pihole_top_sources{job=~'$JobName',instance=~'$Device'}[10m]))) by (source)>0",
          "format": "time_series",
          "instant": false,
          "interval": "",
          "legendFormat": "{{source}}",
          "refId": "A"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Client Activity",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "transformations": [],
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:238",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": "0",
          "show": true
        },
        {
          "$$hashKey": "object:239",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "datasource": null,
      "description": "The types shown here can be limited by updating the QueryTypes variable.  See the description for the variable for an example.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 17
      },
      "id": 52,
      "options": {
        "displayLabels": [],
        "legend": {
          "displayMode": "table",
          "placement": "right",
          "values": [
            "percent"
          ]
        },
        "pieType": "donut",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {}
      },
      "pluginVersion": "7.5.6",
      "targets": [
        {
          "exemplar": true,
          "expr": "avg(pihole_querytypes{job=~'$JobName',instance=~'$Device',type=~'$QueryTypes'}) by (type)",
          "interval": "",
          "legendFormat": "{{type}}",
          "refId": "A"
        }
      ],
      "timeFrom": "24h",
      "title": "Query Types",
      "type": "piechart"
    },
    {
      "datasource": null,
      "description": "If you would like to set up or edit the colors you can edit this pane modify the overrides to match your  upstream DNS servers. ",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 17
      },
      "id": 53,
      "interval": null,
      "options": {
        "displayLabels": [],
        "legend": {
          "displayMode": "table",
          "placement": "right",
          "values": [
            "percent"
          ]
        },
        "pieType": "donut",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {}
      },
      "pluginVersion": "7.5.6",
      "targets": [
        {
          "exemplar": true,
          "expr": "sum(pihole_forward_destinations{job=~'$JobName',instance=~'$Device'}) by (destination,value)",
          "interval": "",
          "legendFormat": "{{destination}}",
          "refId": "A"
        }
      ],
      "timeFrom": "24h",
      "timeShift": null,
      "title": "Queries Answered By",
      "transformations": [
        {
          "id": "renameByRegex",
          "options": {
            "regex": "([^\\.]+)\\..+\\|",
            "renamePattern": "$1 - "
          }
        },
        {
          "id": "renameByRegex",
          "options": {
            "regex": "\\|.*$",
            "renamePattern": ""
          }
        }
      ],
      "type": "piechart"
    },
    {
      "datasource": null,
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "left",
            "filterable": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 25
      },
      "id": 73,
      "options": {
        "showHeader": true,
        "sortBy": [
          {
            "desc": false,
            "displayName": "domain"
          }
        ]
      },
      "pluginVersion": "7.5.7",
      "targets": [
        {
          "exemplar": true,
          "expr": "sum(pihole_top_queries{job=~'$JobName',instance=~'$Device'}) by (domain)",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "timeFrom": "24h",
      "title": "Top Permitted Domains",
      "transformations": [
        {
          "id": "filterFieldsByName",
          "options": {
            "include": {
              "names": [
                "domain",
                "Value"
              ]
            }
          }
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {},
            "indexByName": {},
            "renameByName": {
              "Value": "Hits",
              "Value (last)": "Hits",
              "Value (lastNotNull)": "Hits",
              "domain": "Domain"
            }
          }
        },
        {
          "id": "sortBy",
          "options": {
            "fields": {},
            "sort": [
              {
                "desc": true,
                "field": "Hits"
              }
            ]
          }
        }
      ],
      "type": "table"
    },
    {
      "datasource": null,
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "left",
            "filterable": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 25
      },
      "id": 74,
      "options": {
        "showHeader": true,
        "sortBy": [
          {
            "desc": true,
            "displayName": "Hits"
          }
        ]
      },
      "pluginVersion": "7.5.7",
      "targets": [
        {
          "exemplar": true,
          "expr": "sum(pihole_top_ads{job=~'$JobName',instance=~'$Device'}) by (domain)",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "timeFrom": "24h",
      "title": "Top Blocked Domains",
      "transformations": [
        {
          "id": "filterFieldsByName",
          "options": {
            "include": {
              "names": [
                "domain",
                "Value"
              ]
            }
          }
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {},
            "indexByName": {},
            "renameByName": {
              "Value": "Hits",
              "Value #A": "Hits",
              "Value #A (last)": "Hits",
              "domain": "Domain"
            }
          }
        },
        {
          "id": "sortBy",
          "options": {
            "fields": {},
            "sort": [
              {
                "desc": true,
                "field": "Hits"
              }
            ]
          }
        }
      ],
      "type": "table"
    },
    {
      "datasource": null,
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "left",
            "filterable": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 33
      },
      "id": 76,
      "options": {
        "showHeader": true
      },
      "pluginVersion": "7.5.7",
      "targets": [
        {
          "exemplar": true,
          "expr": "sum(pihole_top_sources{job=~'$JobName',instance=~'$Device'}) by (source)",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "timeFrom": "24h",
      "title": "Top Clients (total)",
      "transformations": [
        {
          "id": "filterFieldsByName",
          "options": {
            "include": {
              "names": [
                "Value",
                "source"
              ]
            }
          }
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {},
            "indexByName": {},
            "renameByName": {
              "Value": "Requests",
              "source": "Client"
            }
          }
        },
        {
          "id": "sortBy",
          "options": {
            "fields": {},
            "sort": [
              {
                "desc": true,
                "field": "Requests"
              }
            ]
          }
        }
      ],
      "type": "table"
    },
    {
      "datasource": null,
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "center",
            "filterable": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "dark-red",
                "value": null
              },
              {
                "color": "dark-blue",
                "value": 1
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Pihole Server"
            },
            "properties": [
              {
                "id": "custom.align",
                "value": "left"
              },
              {
                "id": "custom.displayMode",
                "value": "color-background"
              },
              {
                "id": "color",
                "value": {
                  "fixedColor": "dark-blue",
                  "mode": "fixed"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Pihole Status"
            },
            "properties": [
              {
                "id": "mappings",
                "value": [
                  {
                    "from": "",
                    "id": 1,
                    "text": "DISABLED",
                    "to": "",
                    "type": 1,
                    "value": "0"
                  },
                  {
                    "from": "",
                    "id": 2,
                    "text": "ENABLED",
                    "to": "",
                    "type": 1,
                    "value": "1"
                  }
                ]
              },
              {
                "id": "custom.width",
                "value": 150
              },
              {
                "id": "custom.displayMode",
                "value": "color-background"
              },
              {
                "id": "thresholds",
                "value": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "dark-blue",
                      "value": null
                    },
                    {
                      "color": "dark-red",
                      "value": 0
                    },
                    {
                      "color": "dark-blue",
                      "value": 1
                    }
                  ]
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Total Domains in Blocklists"
            },
            "properties": [
              {
                "id": "unit",
                "value": "locale"
              },
              {
                "id": "custom.displayMode",
                "value": "color-background"
              },
              {
                "id": "custom.width",
                "value": 200
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 33
      },
      "id": 94,
      "options": {
        "showHeader": true,
        "sortBy": [
          {
            "desc": true,
            "displayName": "Hits"
          }
        ]
      },
      "pluginVersion": "7.5.7",
      "targets": [
        {
          "exemplar": true,
          "expr": "pihole_status{job=~'$JobName'}",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        },
        {
          "exemplar": true,
          "expr": "pihole_domains_being_blocked{job=~'$JobName'}",
          "format": "table",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "B"
        }
      ],
      "timeFrom": "24h",
      "title": "Pi-hole Server Information",
      "transformations": [
        {
          "id": "seriesToColumns",
          "options": {
            "byField": "instance"
          }
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {},
            "indexByName": {},
            "renameByName": {
              "Value": "Status",
              "Value #A": "Pihole Status",
              "Value #A (last)": "Hits",
              "Value #B": "Total Domains in Blocklists",
              "__name__ 2": "",
              "domain": "Domain",
              "hostname": "Pihole Server",
              "hostname 1": "Pihole Server",
              "job 1": "",
              "job 2": ""
            }
          }
        },
        {
          "id": "filterFieldsByName",
          "options": {
            "include": {
              "names": [
                "Pihole Server",
                "Total Domains in Blocklists",
                "Pihole Status"
              ]
            }
          }
        },
        {
          "id": "sortBy",
          "options": {
            "fields": {},
            "sort": [
              {
                "field": "Pihole Server"
              }
            ]
          }
        }
      ],
      "type": "table"
    }
  ],
  "refresh": "30s",
  "schemaVersion": 27,
  "style": "dark",
  "tags": [
    "pihole"
  ],
  "templating": {
    "list": [
      {
        "description": "Total Number of Pihole Systems manually entered.",
        "error": null,
        "hide": 2,
        "label": null,
        "name": "PiholeDevices",
        "query": "${VAR_PIHOLEDEVICES}",
        "skipUrlSync": false,
        "type": "constant",
        "current": {
          "value": "${VAR_PIHOLEDEVICES}",
          "text": "${VAR_PIHOLEDEVICES}",
          "selected": false
        },
        "options": [
          {
            "value": "${VAR_PIHOLEDEVICES}",
            "text": "${VAR_PIHOLEDEVICES}",
            "selected": false
          }
        ]
      },
      {
        "allValue": "",
        "current": {},
        "datasource": "${DS_PROMETHEUS}",
        "definition": "label_values(pihole_status,job)",
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": false,
        "label": "JobName",
        "multi": false,
        "name": "JobName",
        "options": [],
        "query": {
          "query": "label_values(pihole_status,job)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_PROMETHEUS}",
        "definition": "query_result(pihole_status{job=~'$JobName'})",
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": true,
        "label": null,
        "multi": true,
        "name": "Device",
        "options": [],
        "query": {
          "query": "query_result(pihole_status{job=~'$JobName'})",
          "refId": "StandardVariableQuery"
        },
        "refresh": 2,
        "regex": ".*instance=\"(.*?)\".*",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_PROMETHEUS}",
        "definition": "label_values(pihole_querytypes,type)",
        "description": "To filter out specific types use something similar to /^(?!ANY|DNSKEY|DS|HTTPS|MX|RRSIG|SOA|SVCB)/",
        "error": null,
        "hide": 2,
        "includeAll": true,
        "label": "QueryTypes",
        "multi": true,
        "name": "QueryTypes",
        "options": [],
        "query": {
          "query": "label_values(pihole_querytypes,type)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 2,
        "regex": "/^(?!ANY|DNSKEY|DS|HTTPS|MX|RRSIG|SOA|SVCB)/",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-24h",
    "to": "now"
  },
  "timepicker": {},
  "timezone": "",
  "title": "Pi-hole UI",
  "uid": "k3hcIZqMk",
  "version": 89
}