Grafana dashboard: DHCP Leases
Description: DHCP servers IP usage

Collector is a powershell script scheduled in Windows server. I have uploaded it here:
https://github.com/micelshima/InfluxDB-Powershell-Module

{
  "__inputs": [
    {
      "name": "DS_MONITORING_DATASOURCE",
      "label": "Monitoring datasource",
      "description": "",
      "type": "datasource",
      "pluginId": "influxdb",
      "pluginName": "InfluxDB"
    },
    {
      "name": "DS_REPORTING_DATASOURCE",
      "label": "Reporting datasource",
      "description": "",
      "type": "datasource",
      "pluginId": "influxdb",
      "pluginName": "InfluxDB"
    }
  ],
  "__requires": [
    {
      "type": "panel",
      "id": "grafana-piechart-panel",
      "name": "Pie Chart",
      "version": "1.1.4"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": ""
    },
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "4.0.1"
    },
    {
      "type": "datasource",
      "id": "influxdb",
      "name": "InfluxDB",
      "version": "1.0.0"
    }
  ],
  "id": null,
  "title": "DHCP Leases",
  "tags": [
    "monitor"
  ],
  "style": "dark",
  "timezone": "browser",
  "editable": true,
  "sharedCrosshair": false,
  "hideControls": false,
  "time": {
    "from": "now-24h",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ],
    "time_options": [
      "5m",
      "15m",
      "1h",
      "6h",
      "12h",
      "24h",
      "2d",
      "7d",
      "30d"
    ]
  },
  "templating": {
    "list": [
      {
        "current": {},
        "datasource": "${DS_MONITORING_DATASOURCE}",
        "hide": 0,
        "includeAll": false,
        "multi": false,
        "name": "location",
        "options": [],
        "query": "SHOW TAG VALUES from dhcpleases WITH KEY = \"location\"",
        "refresh": 1,
        "type": "query",
        "label": null,
        "regex": "",
        "sort": 0,
        "allValue": null,
        "tagsQuery": null,
        "tagValuesQuery": null
      },
      {
        "current": {},
        "datasource": "${DS_MONITORING_DATASOURCE}",
        "hide": 0,
        "includeAll": true,
        "label": "DHCP Server",
        "multi": true,
        "name": "dhcpserver",
        "options": [],
        "query": "show tag values from dhcpleases with key=\"servername\" where location=~ /$location$/",
        "refresh": 1,
        "type": "query",
        "regex": "",
        "sort": 0,
        "allValue": null,
        "tagsQuery": null,
        "tagValuesQuery": null
      }
    ]
  },
  "annotations": {
    "list": []
  },
  "refresh": "15m",
  "schemaVersion": 13,
  "version": 66,
  "links": [],
  "gnetId": 1115,
  "rows": [
    {
      "title": "Row",
      "panels": [
        {
          "aliasColors": {
            "Free": "#EAB839",
            "In Use": "#967302",
            "dhcpleases.In Use": "#E24D42"
          },
          "cacheTimeout": null,
          "datasource": "${DS_MONITORING_DATASOURCE}",
          "editable": true,
          "error": false,
          "fontSize": "80%",
          "format": "short",
          "id": 1,
          "interval": null,
          "legend": {
            "show": true,
            "values": true
          },
          "legendType": "Under graph",
          "links": [],
          "maxDataPoints": 3,
          "minSpan": 3,
          "nullPointMode": "connected",
          "pieType": "pie",
          "repeat": "dhcpserver",
          "span": 6,
          "strokeWidth": "0",
          "targets": [
            {
              "alias": "$col",
              "dsType": "influxdb",
              "groupBy": [
                {
                  "params": [
                    "$interval"
                  ],
                  "type": "time"
                },
                {
                  "params": [
                    "null"
                  ],
                  "type": "fill"
                }
              ],
              "measurement": "dhcpleases",
              "policy": "default",
              "query": "SELECT mean(\"inuse\") AS \"In Use\",  mean(\"free\") AS \"Free\"  FROM \"dhcpleases\" WHERE \"servername\" =~ /$dhcpserver$/ AND $timeFilter GROUP BY time($interval) fill(null)",
              "rawQuery": true,
              "refId": "B",
              "resultFormat": "time_series",
              "select": [
                [
                  {
                    "params": [
                      "free"
                    ],
                    "type": "field"
                  },
                  {
                    "params": [],
                    "type": "mean"
                  },
                  {
                    "params": [
                      "Free"
                    ],
                    "type": "alias"
                  }
                ],
                [
                  {
                    "params": [
                      "inuse"
                    ],
                    "type": "field"
                  },
                  {
                    "params": [],
                    "type": "mean"
                  },
                  {
                    "params": [
                      "In Use"
                    ],
                    "type": "alias"
                  }
                ]
              ],
              "tags": [
                {
                  "key": "servername",
                  "operator": "=~",
                  "value": "/^$DHCPserver$/"
                }
              ]
            }
          ],
          "title": "$dhcpserver",
          "type": "grafana-piechart-panel",
          "valueName": "current",
          "combine": {
            "threshold": 0,
            "label": "Others"
          }
        }
      ],
      "showTitle": false,
      "titleSize": "h6",
      "height": "250px",
      "repeat": null,
      "repeatRowId": null,
      "repeatIteration": null,
      "collapse": false
    },
    {
      "title": "New row",
      "panels": [
        {
          "aliasColors": {
            "SVBPNADC04": "#7EB26D",
            "SVBPNADC05": "#EAB839",
            "Total Scope": "#BF1B00"
          },
          "bars": false,
          "datasource": "${DS_MONITORING_DATASOURCE}",
          "decimals": 0,
          "editable": true,
          "error": false,
          "fill": 2,
          "grid": {},
          "id": 2,
          "interval": ">30m",
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": true,
            "max": false,
            "min": false,
            "rightSide": true,
            "show": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 2,
          "links": [],
          "nullPointMode": "connected",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [
            {
              "alias": "Total Scope",
              "fill": 0,
              "legend": false,
              "linewidth": 2,
              "stack": false
            }
          ],
          "span": 12,
          "stack": true,
          "steppedLine": false,
          "targets": [
            {
              "alias": "$tag_servername",
              "dsType": "influxdb",
              "groupBy": [
                {
                  "params": [
                    "$interval"
                  ],
                  "type": "time"
                },
                {
                  "params": [
                    "servername"
                  ],
                  "type": "tag"
                },
                {
                  "params": [
                    "null"
                  ],
                  "type": "fill"
                }
              ],
              "measurement": "dhcpleases",
              "policy": "default",
              "query": "SELECT sum(\"inuse\") FROM \"dhcpleases\" WHERE \"servername\" =~ /$dhcpserver$/ AND $timeFilter GROUP BY time($interval), \"servername\" fill(null)",
              "rawQuery": true,
              "refId": "B",
              "resultFormat": "time_series",
              "select": [
                [
                  {
                    "params": [
                      "inuse"
                    ],
                    "type": "field"
                  },
                  {
                    "params": [],
                    "type": "sum"
                  }
                ]
              ],
              "tags": [
                {
                  "key": "servername",
                  "operator": "=~",
                  "value": "/^$dhcpserver$/"
                }
              ]
            },
            {
              "alias": "Total Scope",
              "dsType": "influxdb",
              "groupBy": [
                {
                  "params": [
                    "$interval"
                  ],
                  "type": "time"
                },
                {
                  "params": [
                    "null"
                  ],
                  "type": "fill"
                }
              ],
              "measurement": "dhcpleases",
              "policy": "default",
              "refId": "A",
              "resultFormat": "time_series",
              "select": [
                [
                  {
                    "params": [
                      "total"
                    ],
                    "type": "field"
                  },
                  {
                    "params": [],
                    "type": "sum"
                  }
                ]
              ],
              "tags": [
                {
                  "key": "servername",
                  "operator": "=~",
                  "value": "/^$dhcpserver$/"
                }
              ]
            }
          ],
          "timeFrom": null,
          "timeShift": null,
          "title": "DHCP Leases in use",
          "tooltip": {
            "msResolution": false,
            "shared": true,
            "value_type": "individual",
            "sort": 0
          },
          "type": "graph",
          "xaxis": {
            "show": true,
            "mode": "time",
            "name": null,
            "values": []
          },
          "yaxes": [
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": 0,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ],
          "thresholds": []
        },
        {
          "aliasColors": {
            "SVBPNADC04": "#7EB26D",
            "SVBPNADC05": "#EAB839",
            "Total Scope": "#BF1B00"
          },
          "bars": false,
          "datasource": "${DS_REPORTING_DATASOURCE}",
          "decimals": 0,
          "editable": true,
          "error": false,
          "fill": 2,
          "grid": {},
          "id": 3,
          "interval": ">1d",
          "legend": {
            "alignAsTable": true,
            "avg": false,
            "current": false,
            "max": true,
            "min": true,
            "rightSide": true,
            "show": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 2,
          "links": [],
          "nullPointMode": "connected",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [
            {
              "alias": "Total Scope",
              "fill": 0,
              "legend": false,
              "linewidth": 2,
              "stack": false
            }
          ],
          "span": 12,
          "stack": true,
          "steppedLine": false,
          "targets": [
            {
              "alias": "$tag_servername",
              "dsType": "influxdb",
              "groupBy": [
                {
                  "params": [
                    "$interval"
                  ],
                  "type": "time"
                },
                {
                  "params": [
                    "servername"
                  ],
                  "type": "tag"
                },
                {
                  "params": [
                    "null"
                  ],
                  "type": "fill"
                }
              ],
              "measurement": "dhcpleases",
              "policy": "default",
              "query": "SELECT sum(\"inuse\") FROM \"dhcpleases\" WHERE \"servername\" =~ /$dhcpserver$/ AND $timeFilter GROUP BY time($interval), \"servername\" fill(null)",
              "rawQuery": true,
              "refId": "B",
              "resultFormat": "time_series",
              "select": [
                [
                  {
                    "params": [
                      "inuse"
                    ],
                    "type": "field"
                  },
                  {
                    "params": [],
                    "type": "sum"
                  }
                ]
              ],
              "tags": [
                {
                  "key": "servername",
                  "operator": "=~",
                  "value": "/^$dhcpserver$/"
                }
              ]
            },
            {
              "alias": "Total Scope",
              "dsType": "influxdb",
              "groupBy": [
                {
                  "params": [
                    "$interval"
                  ],
                  "type": "time"
                },
                {
                  "params": [
                    "null"
                  ],
                  "type": "fill"
                }
              ],
              "measurement": "dhcpleases",
              "policy": "default",
              "refId": "A",
              "resultFormat": "time_series",
              "select": [
                [
                  {
                    "params": [
                      "total"
                    ],
                    "type": "field"
                  },
                  {
                    "params": [],
                    "type": "sum"
                  }
                ]
              ],
              "tags": [
                {
                  "key": "servername",
                  "operator": "=~",
                  "value": "/^$dhcpserver$/"
                }
              ]
            }
          ],
          "timeFrom": "8w",
          "timeShift": null,
          "title": "DHCP Leases History",
          "tooltip": {
            "msResolution": false,
            "shared": true,
            "value_type": "individual",
            "sort": 0
          },
          "type": "graph",
          "xaxis": {
            "show": true,
            "mode": "time",
            "name": null,
            "values": []
          },
          "yaxes": [
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": 0,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ],
          "thresholds": []
        }
      ],
      "showTitle": false,
      "titleSize": "h6",
      "height": "250px",
      "repeat": null,
      "repeatRowId": null,
      "repeatIteration": null,
      "collapse": false
    }
  ],
  "description": "DHCP servers IP usage"
}