Grafana dashboard: DHCP
Description: ISC DHCP Server Pools

Dashboard for data collected by CollectD ISC DHCP Server plugin found at: [https://github.com/Yuav/collectd-iscdhcp](https://github.com/Yuav/collectd-iscdhcp)

Using Puppet module [https://github.com/onpuppet/puppet-monitoring](https://github.com/onpuppet/puppet-monitoring) will automatically install and collect metrics using CollectD into any supported CollectD network server seen in this dashboard

{
  "__inputs": [
    {
      "name": "DS_SERVER_COLLECTD",
      "label": "server_collectd",
      "description": "CollectD data in InfluxDB",
      "type": "datasource",
      "pluginId": "influxdb",
      "pluginName": "InfluxDB"
    }
  ],
  "__requires": [
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": ""
    },
    {
      "type": "panel",
      "id": "singlestat",
      "name": "Singlestat",
      "version": ""
    },
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "3.1.1"
    },
    {
      "type": "datasource",
      "id": "influxdb",
      "name": "InfluxDB",
      "version": "1.0.0"
    }
  ],
  "id": null,
  "title": "DHCP",
  "tags": [],
  "style": "dark",
  "timezone": "browser",
  "editable": true,
  "hideControls": false,
  "sharedCrosshair": true,
  "rows": [
    {
      "collapse": false,
      "editable": true,
      "height": "250px",
      "panels": [
        {
          "aliasColors": {},
          "bars": false,
          "datasource": "${DS_SERVER_COLLECTD}",
          "editable": true,
          "error": false,
          "fill": 1,
          "grid": {
            "threshold1": null,
            "threshold1Color": "rgba(216, 200, 27, 0.27)",
            "threshold2": null,
            "threshold2Color": "rgba(234, 112, 112, 0.22)"
          },
          "id": 1,
          "isNew": true,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": true,
            "max": true,
            "min": true,
            "rightSide": false,
            "show": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 2,
          "links": [],
          "nullPointMode": "connected",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "span": 12,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "alias": "Total",
              "dsType": "influxdb",
              "groupBy": [
                {
                  "params": [
                    "$interval"
                  ],
                  "type": "time"
                },
                {
                  "params": [
                    "null"
                  ],
                  "type": "fill"
                }
              ],
              "measurement": "iscdhcp_value",
              "policy": "default",
              "refId": "A",
              "resultFormat": "time_series",
              "select": [
                [
                  {
                    "params": [
                      "value"
                    ],
                    "type": "field"
                  },
                  {
                    "params": [],
                    "type": "mean"
                  }
                ]
              ],
              "tags": [
                {
                  "key": "host",
                  "operator": "=~",
                  "value": "/^$host$/"
                },
                {
                  "condition": "AND",
                  "key": "instance",
                  "operator": "=",
                  "value": "All networks"
                },
                {
                  "condition": "AND",
                  "key": "type_instance",
                  "operator": "=",
                  "value": "total"
                }
              ]
            },
            {
              "alias": "Used",
              "dsType": "influxdb",
              "groupBy": [
                {
                  "params": [
                    "$interval"
                  ],
                  "type": "time"
                },
                {
                  "params": [
                    "null"
                  ],
                  "type": "fill"
                }
              ],
              "measurement": "iscdhcp_value",
              "policy": "default",
              "refId": "B",
              "resultFormat": "time_series",
              "select": [
                [
                  {
                    "params": [
                      "value"
                    ],
                    "type": "field"
                  },
                  {
                    "params": [],
                    "type": "mean"
                  }
                ]
              ],
              "tags": [
                {
                  "key": "host",
                  "operator": "=",
                  "value": "lys-dhcp2.domain.com"
                },
                {
                  "condition": "AND",
                  "key": "type",
                  "operator": "=",
                  "value": "count"
                },
                {
                  "condition": "AND",
                  "key": "type_instance",
                  "operator": "=",
                  "value": "used"
                },
                {
                  "condition": "AND",
                  "key": "instance",
                  "operator": "=",
                  "value": "All networks"
                }
              ]
            }
          ],
          "timeFrom": null,
          "timeShift": null,
          "title": "Total leases",
          "tooltip": {
            "msResolution": true,
            "shared": true,
            "sort": 0,
            "value_type": "cumulative"
          },
          "type": "graph",
          "xaxis": {
            "show": true
          },
          "yaxes": [
            {
              "format": "none",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            }
          ]
        }
      ],
      "title": "Row"
    },
    {
      "collapse": false,
      "editable": true,
      "height": "250px",
      "panels": [
        {
          "cacheTimeout": null,
          "colorBackground": true,
          "colorValue": false,
          "colors": [
            "rgba(50, 172, 45, 0.97)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(245, 54, 54, 0.9)"
          ],
          "datasource": "${DS_SERVER_COLLECTD}",
          "decimals": null,
          "editable": true,
          "error": false,
          "format": "percent",
          "gauge": {
            "maxValue": 100,
            "minValue": 0,
            "show": false,
            "thresholdLabels": false,
            "thresholdMarkers": false
          },
          "height": "100px",
          "id": 2,
          "interval": null,
          "isNew": true,
          "links": [],
          "mappingType": 1,
          "mappingTypes": [
            {
              "name": "value to text",
              "value": 1
            },
            {
              "name": "range to text",
              "value": 2
            }
          ],
          "maxDataPoints": 100,
          "minSpan": 1,
          "nullPointMode": "connected",
          "nullText": null,
          "postfix": "",
          "postfixFontSize": "50%",
          "prefix": "",
          "prefixFontSize": "50%",
          "rangeMaps": [
            {
              "from": "null",
              "text": "N/A",
              "to": "null"
            }
          ],
          "repeat": "dhcppool",
          "scopedVars": {
            "dhcppool": {
              "text": "10.47.0.200 - 10.47.0.254",
              "value": "10.47.0.200 - 10.47.0.254",
              "selected": false
            }
          },
          "span": 1,
          "sparkline": {
            "fillColor": "rgba(31, 118, 189, 0.18)",
            "full": false,
            "lineColor": "rgb(31, 120, 193)",
            "show": false
          },
          "targets": [
            {
              "dsType": "influxdb",
              "groupBy": [
                {
                  "params": [
                    "$interval"
                  ],
                  "type": "time"
                },
                {
                  "params": [
                    "null"
                  ],
                  "type": "fill"
                }
              ],
              "measurement": "iscdhcp_value",
              "policy": "default",
              "refId": "A",
              "resultFormat": "time_series",
              "select": [
                [
                  {
                    "params": [
                      "value"
                    ],
                    "type": "field"
                  },
                  {
                    "params": [],
                    "type": "last"
                  }
                ]
              ],
              "tags": [
                {
                  "key": "host",
                  "operator": "=~",
                  "value": "/^$host$/"
                },
                {
                  "condition": "AND",
                  "key": "type",
                  "operator": "=",
                  "value": "percent"
                },
                {
                  "condition": "AND",
                  "key": "type_instance",
                  "operator": "=",
                  "value": "used_percent"
                },
                {
                  "condition": "AND",
                  "key": "instance",
                  "operator": "=~",
                  "value": "/^$dhcppool$/"
                }
              ]
            }
          ],
          "thresholds": "50,80",
          "title": "$dhcppool",
          "type": "singlestat",
          "valueFontSize": "80%",
          "valueMaps": [
            {
              "op": "=",
              "text": "N/A",
              "value": "null"
            }
          ],
          "valueName": "avg"
        }
      ],
      "title": "New row"
    }
  ],
  "time": {
    "from": "now-15m",
    "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": {
          "text": "server_collectd",
          "value": "server_collectd"
        },
        "datasource": null,
        "hide": 0,
        "includeAll": false,
        "label": "Datasource",
        "multi": false,
        "name": "datasource",
        "options": [
          {
            "text": "InfluxDB Internals",
            "value": "InfluxDB Internals",
            "selected": false
          },
          {
            "text": "default",
            "value": "default",
            "selected": false
          },
          {
            "text": "lys-stat_sensu",
            "value": "lys-stat_sensu",
            "selected": false
          },
          {
            "text": "server_collectd",
            "value": "server_collectd",
            "selected": true
          }
        ],
        "query": "influxdb",
        "refresh": 1,
        "regex": "",
        "type": "datasource"
      },
      {
        "current": {},
        "datasource": "${DS_SERVER_COLLECTD}",
        "hide": 0,
        "includeAll": false,
        "label": "Host",
        "multi": false,
        "name": "host",
        "options": [],
        "query": "SHOW TAG VALUES FROM \"iscdhcp_value\" WITH KEY=host",
        "refresh": 1,
        "regex": "",
        "type": "query"
      },
      {
        "current": {},
        "datasource": "${DS_SERVER_COLLECTD}",
        "hide": 0,
        "includeAll": true,
        "label": "DHCP Pool",
        "multi": true,
        "name": "dhcppool",
        "options": [],
        "query": "SHOW TAG VALUES FROM iscdhcp_value WITH KEY = instance WHERE host =~ /$host/",
        "refresh": 1,
        "regex": "",
        "type": "query"
      }
    ]
  },
  "annotations": {
    "list": []
  },
  "refresh": false,
  "schemaVersion": 12,
  "version": 7,
  "links": [],
  "gnetId": 1536,
  "description": "ISC DHCP Server Pools"
}