piholestats
Data extracted from sqlite3 on pi-hole, transformed with telegraf, and loaded into influxdb.
Place this [script](https://gist.github.com/wheel5up/a2b58209efdf435a3af3e0cb8fdae09a)
at  /usr/local/bin/. Set permissions so telegraf can execute it. Update your telegraf config with the collector config above. More details can be found [here](https://jswheeler.medium.com/sending-pi-hole-metrics-to-influxdb-with-telegraf-38c15356cc68)
[[inputs.exec]]
  commands = ["/usr/local/bin/piholestats"]
  precision = "1ms"
  name_override = "piholestats"
  data_format = "csv"
  timeout = "5s"
  csv_header_row_count=0
  csv_column_names = ["timestamp","type","status","domain","client","forward","id"]
  csv_delimiter = "|"
  csv_tag_columns = ["domain","client","forward","type","status"]
  csv_timestamp_column = "timestamp"
  csv_timestamp_format = "unix_ms"
{
  "__inputs": [
    {
      "name": "DS_INFLUXDB",
      "label": "InfluxDB",
      "description": "Standard Influxdb",
      "type": "datasource",
      "pluginId": "influxdb",
      "pluginName": "InfluxDB"
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "7.4.2"
    },
    {
      "type": "panel",
      "id": "grafana-piechart-panel",
      "name": "Pie Chart",
      "version": "1.6.1"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "influxdb",
      "name": "InfluxDB",
      "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"
      }
    ]
  },
  "editable": true,
  "gnetId": 14035,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1615348805850,
  "links": [],
  "panels": [
    {
      "datasource": "${DS_INFLUXDB}",
      "fieldConfig": {
        "defaults": {
          "custom": {},
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 3,
        "w": 4,
        "x": 0,
        "y": 0
      },
      "id": 14,
      "options": {
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "mean"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "7.4.2",
      "targets": [
        {
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT count(*)  FROM \"piholestats\"  WHERE $timeFilter",
          "rawQuery": true,
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "tags": []
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Total requests",
      "type": "stat"
    },
    {
      "datasource": "${DS_INFLUXDB}",
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": "left",
            "displayMode": "auto",
            "filterable": true
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "none"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "client"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 110
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 13,
        "w": 2,
        "x": 4,
        "y": 0
      },
      "id": 12,
      "options": {
        "showHeader": true,
        "sortBy": [
          {
            "desc": true,
            "displayName": "count"
          }
        ]
      },
      "pluginVersion": "7.4.2",
      "targets": [
        {
          "alias": "$tag_client",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT count(id) FROM \"piholestats\" WHERE $timeFilter AND (\"status\" =~ /$status$/) AND (\"client\" =~ /$client/) AND (\"host\" =~ /$host$/)  AND (\"type\" =~ /$type$/)  GROUP BY \"client\"",
          "rawQuery": true,
          "refId": "A",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "tags": []
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Top Clients",
      "transformations": [
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "Time": true
            },
            "indexByName": {},
            "renameByName": {}
          }
        }
      ],
      "type": "table"
    },
    {
      "datasource": "${DS_INFLUXDB}",
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": "left",
            "filterable": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "domain"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 253
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 13,
        "w": 4,
        "x": 6,
        "y": 0
      },
      "id": 18,
      "options": {
        "showHeader": true,
        "sortBy": [
          {
            "desc": true,
            "displayName": "count"
          }
        ]
      },
      "pluginVersion": "7.4.2",
      "targets": [
        {
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT count(id) as count FROM \"piholestats\" WHERE $timeFilter AND (\"status\" =~ /$status$/) AND (\"client\" =~ /$client/) AND (\"host\" =~ /$host$/)  AND (\"type\" =~ /$type$/) GROUP BY \"domain\"\n",
          "rawQuery": true,
          "refId": "A",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "tags": []
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Top Domains",
      "transformations": [
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "Time": true
            },
            "indexByName": {},
            "renameByName": {}
          }
        }
      ],
      "type": "table"
    },
    {
      "datasource": "${DS_INFLUXDB}",
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": "left",
            "filterable": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "client"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 108
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 13,
        "w": 2,
        "x": 10,
        "y": 0
      },
      "id": 16,
      "options": {
        "showHeader": true,
        "sortBy": [
          {
            "desc": true,
            "displayName": "count"
          }
        ]
      },
      "pluginVersion": "7.4.2",
      "targets": [
        {
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT count(id)  as count FROM \"piholestats\" WHERE $timeFilter AND (\"status\" =~ /1$|4$|5$|6$|7$|8$|9$|^10$|^11$/) AND (\"client\" =~ /$client/) AND (\"host\" =~ /$host$/)  AND (\"type\" =~ /$type$/) GROUP BY \"client\"\n",
          "rawQuery": true,
          "refId": "A",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "tags": []
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Top Blocked Clients",
      "transformations": [
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "Time": true
            },
            "indexByName": {},
            "renameByName": {}
          }
        }
      ],
      "type": "table"
    },
    {
      "datasource": "${DS_INFLUXDB}",
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": "left",
            "filterable": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "domain"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 253
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 13,
        "w": 4,
        "x": 12,
        "y": 0
      },
      "id": 17,
      "options": {
        "showHeader": true,
        "sortBy": [
          {
            "desc": true,
            "displayName": "count"
          }
        ]
      },
      "pluginVersion": "7.4.2",
      "targets": [
        {
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT count(id) as count FROM \"piholestats\" WHERE $timeFilter AND (\"status\" =~ /^1$|4$|5$|6$|7$|8$|9$|^10$|^11$/) AND (\"client\" =~ /$client/) AND (\"host\" =~ /$host$/)  AND (\"type\" =~ /$type$/) GROUP BY \"domain\"\n",
          "rawQuery": true,
          "refId": "A",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "tags": []
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Top Blocked Domains",
      "transformations": [
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "Time": true
            },
            "indexByName": {},
            "renameByName": {}
          }
        }
      ],
      "type": "table"
    },
    {
      "aliasColors": {},
      "breakPoint": "50%",
      "cacheTimeout": null,
      "combine": {
        "label": "Others",
        "threshold": 0
      },
      "datasource": "${DS_INFLUXDB}",
      "description": "",
      "fieldConfig": {
        "defaults": {
          "custom": {}
        },
        "overrides": []
      },
      "fontSize": "80%",
      "format": "none",
      "gridPos": {
        "h": 13,
        "w": 4,
        "x": 16,
        "y": 0
      },
      "id": 20,
      "interval": null,
      "legend": {
        "percentage": true,
        "show": true,
        "sort": "total",
        "sortDesc": true,
        "values": true
      },
      "legendType": "Under graph",
      "links": [],
      "nullPointMode": "connected",
      "pieType": "donut",
      "pluginVersion": "7.3.6",
      "strokeWidth": 1,
      "targets": [
        {
          "alias": "$tag_status:$tag_forward",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT count(*) FROM \"piholestats\" WHERE $timeFilter AND (\"status\" =~ /$status$/) AND (\"client\" =~ /$client/) AND (\"host\" =~ /$host$/)  AND (\"type\" =~ /$type/) GROUP BY \"forward\", \"status\", time($myrange) fill(null)",
          "rawQuery": true,
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              },
              {
                "params": [
                  "alias"
                ],
                "type": "alias"
              }
            ]
          ],
          "tags": []
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Queries by Resolver",
      "transformations": [
        {
          "id": "renameByRegex",
          "options": {
            "regex": "^3:",
            "renamePattern": "CACHE"
          }
        },
        {
          "id": "renameByRegex",
          "options": {
            "regex": "^(12):",
            "renamePattern": "RETRIED"
          }
        },
        {
          "id": "renameByRegex",
          "options": {
            "regex": "^2:(.*)#53",
            "renamePattern": "FWD:$1"
          }
        },
        {
          "id": "renameByRegex",
          "options": {
            "regex": "^1:",
            "renamePattern": "BLOCKED_GRAVITY"
          }
        },
        {
          "id": "renameByRegex",
          "options": {
            "regex": "^4:",
            "renamePattern": "BLOCKED_REGEX_BLIST"
          }
        },
        {
          "id": "renameByRegex",
          "options": {
            "regex": "^5:",
            "renamePattern": "BLOCKED_EXACT_BLIST"
          }
        },
        {
          "id": "renameByRegex",
          "options": {
            "regex": "^9:",
            "renamePattern": "BLOCKED_CNME_GVTY"
          }
        }
      ],
      "type": "grafana-piechart-panel",
      "valueName": "total"
    },
    {
      "aliasColors": {},
      "breakPoint": "50%",
      "cacheTimeout": null,
      "combine": {
        "label": "Others",
        "threshold": 0
      },
      "datasource": "${DS_INFLUXDB}",
      "description": "",
      "fieldConfig": {
        "defaults": {
          "custom": {}
        },
        "overrides": []
      },
      "fontSize": "80%",
      "format": "none",
      "gridPos": {
        "h": 13,
        "w": 4,
        "x": 20,
        "y": 0
      },
      "id": 21,
      "interval": null,
      "legend": {
        "header": "",
        "percentage": true,
        "percentageDecimals": null,
        "show": true,
        "sort": "total",
        "sortDesc": true,
        "values": true
      },
      "legendType": "Under graph",
      "links": [],
      "nullPointMode": "connected",
      "pieType": "donut",
      "pluginVersion": "7.3.6",
      "strokeWidth": 1,
      "targets": [
        {
          "alias": "$tag_type",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT count(*) FROM \"piholestats\" WHERE $timeFilter AND (\"status\" =~ /$status/) AND (\"client\" =~ /$client/) AND (\"host\" =~ /$host$/)  AND (\"type\" =~ /$type/) GROUP BY \"type\", time($myrange) fill(null)",
          "rawQuery": true,
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              },
              {
                "params": [
                  "alias"
                ],
                "type": "alias"
              }
            ]
          ],
          "tags": []
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Queries by Type",
      "transformations": [
        {
          "id": "renameByRegex",
          "options": {
            "regex": "^(1)$",
            "renamePattern": "$1:A"
          }
        },
        {
          "id": "renameByRegex",
          "options": {
            "regex": "^(14)$",
            "renamePattern": "$1:OTHER"
          }
        },
        {
          "id": "renameByRegex",
          "options": {
            "regex": "^(2)$",
            "renamePattern": "$1:AAAA"
          }
        },
        {
          "id": "renameByRegex",
          "options": {
            "regex": "^(6)$",
            "renamePattern": "$1:PTR"
          }
        },
        {
          "id": "renameByRegex",
          "options": {
            "regex": "^(4)$",
            "renamePattern": "$1:SRV"
          }
        },
        {
          "id": "renameByRegex",
          "options": {
            "regex": "^(7)$",
            "renamePattern": "$1:TXT"
          }
        },
        {
          "id": "renameByRegex",
          "options": {
            "regex": "^(5)$",
            "renamePattern": "$1:SOA"
          }
        },
        {
          "id": "renameByRegex",
          "options": {
            "regex": "^(13)$",
            "renamePattern": "$1:NS"
          }
        }
      ],
      "type": "grafana-piechart-panel",
      "valueName": "total"
    },
    {
      "aliasColors": {},
      "breakPoint": "50%",
      "cacheTimeout": null,
      "combine": {
        "label": "Others",
        "threshold": 0
      },
      "datasource": "${DS_INFLUXDB}",
      "fieldConfig": {
        "defaults": {
          "color": {},
          "custom": {},
          "thresholds": {
            "mode": "absolute",
            "steps": []
          }
        },
        "overrides": []
      },
      "fontSize": "80%",
      "format": "none",
      "gridPos": {
        "h": 10,
        "w": 4,
        "x": 0,
        "y": 3
      },
      "id": 8,
      "interval": null,
      "legend": {
        "percentage": true,
        "show": true,
        "sort": "total",
        "sortDesc": true,
        "values": true
      },
      "legendType": "Under graph",
      "links": [],
      "nullPointMode": "connected",
      "pieType": "pie",
      "pluginVersion": "7.4.2",
      "repeat": null,
      "repeatDirection": "v",
      "strokeWidth": 1,
      "targets": [
        {
          "alias": "$tag_status:",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT count(*)  as count FROM \"piholestats\"  WHERE $timeFilter group by status\n\n",
          "rawQuery": true,
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "tags": []
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Total queries",
      "transformations": [
        {
          "id": "renameByRegex",
          "options": {
            "regex": "^2:|^3:|^12:|^13:|^14:",
            "renamePattern": "ALLOW"
          }
        },
        {
          "id": "renameByRegex",
          "options": {
            "regex": "^1:|^3:|^4:|^5:|^6:|^7:|^8:|^9:|^10:|^11:",
            "renamePattern": "BLOCK"
          }
        }
      ],
      "type": "grafana-piechart-panel",
      "valueName": "total"
    },
    {
      "aliasColors": {},
      "bars": true,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_INFLUXDB}",
      "fieldConfig": {
        "defaults": {
          "custom": {},
          "links": []
        },
        "overrides": [
          {
            "matcher": {
              "id": "byRegexp",
              "options": "^2$"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "ALLOWED_FORWARDED"
              }
            ]
          },
          {
            "matcher": {
              "id": "byRegexp",
              "options": "^1$"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "BLOCKED_GRAVITY"
              }
            ]
          },
          {
            "matcher": {
              "id": "byRegexp",
              "options": "^12$"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "ALLOWED_RETRIED"
              }
            ]
          },
          {
            "matcher": {
              "id": "byRegexp",
              "options": "^3$"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "ALLOWED_CACHED"
              }
            ]
          },
          {
            "matcher": {
              "id": "byRegexp",
              "options": "^4$"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "BLOCKED_REGEX_BLACKLIST"
              }
            ]
          },
          {
            "matcher": {
              "id": "byRegexp",
              "options": "^5$"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "BLOCKED_EXACT_BLACKLIST"
              }
            ]
          },
          {
            "matcher": {
              "id": "byRegexp",
              "options": "^9$"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "BLOCKED_GRAVITY_CNAME"
              }
            ]
          }
        ]
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 11,
        "w": 24,
        "x": 0,
        "y": 13
      },
      "hiddenSeries": false,
      "id": 2,
      "legend": {
        "alignAsTable": false,
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": false,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "7.4.2",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": true,
      "steppedLine": false,
      "targets": [
        {
          "alias": "$tag_status",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT count(*) FROM \"piholestats\" WHERE $timeFilter AND (\"status\" =~ /$status$/) AND (\"client\" =~ /$client/) AND (\"host\" =~ /$host$/)  AND (\"type\" =~ /$type$/) GROUP BY \"status\", time($myrange) fill(null)",
          "rawQuery": true,
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              },
              {
                "params": [
                  "alias"
                ],
                "type": "alias"
              }
            ]
          ],
          "tags": []
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Queries by Status",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "transformations": [],
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:196",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "$$hashKey": "object:197",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {},
      "bars": true,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_INFLUXDB}",
      "description": "",
      "fieldConfig": {
        "defaults": {
          "custom": {}
        },
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 11,
        "w": 24,
        "x": 0,
        "y": 24
      },
      "hiddenSeries": false,
      "id": 4,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": false,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "7.4.2",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": true,
      "steppedLine": false,
      "targets": [
        {
          "alias": "$tag_client",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT count(*) FROM \"piholestats\" WHERE $timeFilter AND (\"status\" =~ /$status/) AND (\"client\" =~ /$client/) AND (\"host\" =~ /$host$/)  AND (\"type\" =~ /$type/) GROUP BY \"client\", time($myrange) fill(null)",
          "rawQuery": true,
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "tags": []
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Queries by Client",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:1015",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "$$hashKey": "object:1016",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {},
      "bars": true,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_INFLUXDB}",
      "fieldConfig": {
        "defaults": {
          "custom": {}
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "1"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "A"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "2"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "AAAA"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "4"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "SRV"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "5"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "SOA"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "6"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "PTR"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "7"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "TXT"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "14"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "OTHER"
              }
            ]
          }
        ]
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 9,
        "w": 24,
        "x": 0,
        "y": 35
      },
      "hiddenSeries": false,
      "id": 10,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": false,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "7.4.2",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": true,
      "steppedLine": false,
      "targets": [
        {
          "alias": "$tag_type",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT count(*) FROM \"piholestats\" WHERE $timeFilter AND (\"status\" =~ /$status/) AND (\"client\" =~ /$client/) AND (\"host\" =~ /$host$/)  AND (\"type\" =~ /$type/) GROUP BY \"type\", time($myrange) fill(null)",
          "rawQuery": true,
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "tags": []
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Query Types",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:636",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "$$hashKey": "object:637",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {},
      "bars": true,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_INFLUXDB}",
      "fieldConfig": {
        "defaults": {
          "custom": {}
        },
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 10,
        "w": 24,
        "x": 0,
        "y": 44
      },
      "hiddenSeries": false,
      "id": 6,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": false,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "7.4.2",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": true,
      "steppedLine": false,
      "targets": [
        {
          "alias": "$tag_host",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT count(*) FROM \"piholestats\" WHERE $timeFilter AND (\"status\" =~ /$status/) AND (\"client\" =~ /$client/) AND (\"host\" =~ /$host$/)  AND (\"type\" =~ /$type/)  GROUP BY \"host\", time($myrange) fill(null)",
          "rawQuery": true,
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "tags": []
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Queries by pihole",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:1563",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "$$hashKey": "object:1564",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    }
  ],
  "refresh": "10s",
  "schemaVersion": 27,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "auto": false,
        "auto_count": 30,
        "auto_min": "10s",
        "current": {
          "selected": false,
          "text": "10m",
          "value": "10m"
        },
        "description": null,
        "error": null,
        "hide": 0,
        "label": "Interval",
        "name": "myrange",
        "options": [
          {
            "selected": false,
            "text": "5m",
            "value": "5m"
          },
          {
            "selected": true,
            "text": "10m",
            "value": "10m"
          },
          {
            "selected": false,
            "text": "30m",
            "value": "30m"
          },
          {
            "selected": false,
            "text": "1h",
            "value": "1h"
          }
        ],
        "query": "5m,10m,30m,1h",
        "queryValue": "",
        "refresh": 2,
        "skipUrlSync": false,
        "type": "interval"
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_INFLUXDB}",
        "definition": "",
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": true,
        "label": "Status",
        "multi": true,
        "name": "status",
        "options": [],
        "query": "show tag values from \"piholestats\" with key=\"status\"",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_INFLUXDB}",
        "definition": "",
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": true,
        "label": "Client",
        "multi": true,
        "name": "client",
        "options": [],
        "query": "show tag values from \"piholestats\" with key=\"client\"",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_INFLUXDB}",
        "definition": "",
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": true,
        "label": "Host",
        "multi": true,
        "name": "host",
        "options": [],
        "query": "show tag values from \"piholestats\" with key=\"host\"",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_INFLUXDB}",
        "definition": "",
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": true,
        "label": "Type",
        "multi": true,
        "name": "type",
        "options": [],
        "query": "show tag values from \"piholestats\" with key=\"type\"",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_INFLUXDB}",
        "definition": "",
        "description": null,
        "error": null,
        "hide": 0,
        "includeAll": true,
        "label": "Status",
        "multi": true,
        "name": "statu",
        "options": [],
        "query": "show tag values from \"piholestats\" with key=\"type\"",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-24h",
    "to": "now"
  },
  "timepicker": {},
  "timezone": "",
  "title": "piholestats",
  "uid": "05K5bYYMz",
  "version": 116,
  "description": "Data extracted from sqlite3 on pi-hole, transformed with telegraf, and loaded into influxdb."
}