Grafana dashboard: Network Interface Stats
Description: Templated dashboard which provides an overview for your router/switch ports and detailed traffic statistics.

Templated dashboard which provides an overview for your router/switch ports and detailed traffic statistics.
The data is gathered by Telegraf over SNMP and is collected in a InfluxDB.

{
  "__inputs": [
    {
      "name": "DS_INFLUXDB",
      "label": "InfluxDB",
      "description": "",
      "type": "datasource",
      "pluginId": "influxdb",
      "pluginName": "InfluxDB"
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "6.2.5"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "influxdb",
      "name": "InfluxDB",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "singlestat",
      "name": "Singlestat",
      "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": 10488,
  "graphTooltip": 1,
  "id": null,
  "iteration": 1562699176565,
  "links": [],
  "panels": [
    {
      "cacheTimeout": null,
      "columns": [],
      "datasource": "${DS_INFLUXDB}",
      "description": "",
      "fontSize": "100%",
      "gridPos": {
        "h": 11,
        "w": 23,
        "x": 0,
        "y": 0
      },
      "id": 145,
      "links": [],
      "options": {},
      "pageSize": null,
      "pluginVersion": "6.1.6",
      "scroll": true,
      "showHeader": true,
      "sort": {
        "col": 2,
        "desc": false
      },
      "styles": [
        {
          "alias": "Time",
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "link": false,
          "pattern": "Time",
          "type": "hidden"
        },
        {
          "alias": "UP/DOWN",
          "colorMode": "value",
          "colors": [
            "#37872D",
            "#37872D",
            "#C4162A"
          ],
          "decimals": 2,
          "mappingType": 1,
          "pattern": "ifOperStatus",
          "thresholds": [
            "1",
            "2"
          ],
          "type": "string",
          "unit": "short",
          "valueMaps": [
            {
              "text": "UP",
              "value": "1"
            },
            {
              "text": "DOWN",
              "value": "2"
            },
            {
              "text": "TEST",
              "value": "3"
            }
          ]
        },
        {
          "alias": "Link Speed",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 0,
          "mappingType": 1,
          "pattern": "ifSpeed",
          "thresholds": [],
          "type": "number",
          "unit": "bps",
          "valueMaps": [
            {
              "text": "100  MB",
              "value": "10000000"
            },
            {
              "text": "1 GB",
              "value": "100000000"
            },
            {
              "text": "10 GB",
              "value": "1000000000"
            }
          ]
        }
      ],
      "targets": [
        {
          "alias": "",
          "groupBy": [
            {
              "params": [
                "ifDescr"
              ],
              "type": "tag"
            }
          ],
          "limit": "1",
          "measurement": "interface",
          "orderByTime": "ASC",
          "policy": "autogen",
          "refId": "A",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "ifOperStatus"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [
                  "ifOperStatus"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "ifInDiscards"
                ],
                "type": "field"
              }
            ],
            [
              {
                "params": [
                  "ifInErrors"
                ],
                "type": "field"
              }
            ],
            [
              {
                "params": [
                  "ifInOctets"
                ],
                "type": "field"
              }
            ],
            [
              {
                "params": [
                  "ifInUcastPkts"
                ],
                "type": "field"
              }
            ],
            [
              {
                "params": [
                  "ifMtu"
                ],
                "type": "field"
              }
            ],
            [
              {
                "params": [
                  "ifOutErrors"
                ],
                "type": "field"
              }
            ],
            [
              {
                "params": [
                  "ifOutDiscards"
                ],
                "type": "field"
              }
            ],
            [
              {
                "params": [
                  "ifSpeed"
                ],
                "type": "field"
              }
            ],
            [
              {
                "params": [
                  "ifPhysAddress"
                ],
                "type": "field"
              }
            ],
            [
              {
                "params": [
                  "ifLastChange"
                ],
                "type": "field"
              }
            ]
          ],
          "tags": [
            {
              "key": "agent_host",
              "operator": "=~",
              "value": "/^$host$/"
            }
          ]
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Interface summary",
      "transform": "table",
      "transparent": true,
      "type": "table"
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 11
      },
      "id": 26,
      "panels": [],
      "title": "Total traffic in $interface",
      "type": "row"
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorPostfix": false,
      "colorPrefix": false,
      "colorValue": false,
      "colors": [
        "#299c46",
        "rgba(237, 129, 40, 0.89)",
        "#d44a3a"
      ],
      "format": "bytes",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 2,
        "w": 12,
        "x": 0,
        "y": 12
      },
      "id": 28,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "maxPerRow": 6,
      "nullPointMode": "connected",
      "nullText": null,
      "options": {},
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "repeat": "interface",
      "repeatDirection": "h",
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": true,
        "lineColor": "rgb(31, 120, 193)",
        "show": true
      },
      "tableColumn": "non_negative_difference",
      "targets": [
        {
          "groupBy": [],
          "measurement": "interface",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "ifHCInOctets"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "non_negative_difference"
              }
            ]
          ],
          "tags": [
            {
              "key": "agent_host",
              "operator": "=~",
              "value": "/^$host$/"
            },
            {
              "condition": "AND",
              "key": "ifDescr",
              "operator": "=~",
              "value": "/^$interface$/"
            }
          ]
        }
      ],
      "thresholds": "",
      "timeFrom": null,
      "timeShift": null,
      "title": "$interface in",
      "type": "singlestat",
      "valueFontSize": "80%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "total"
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 14
      },
      "id": 81,
      "panels": [],
      "title": "Total traffic out $interface",
      "type": "row"
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": false,
      "colors": [
        "#299c46",
        "rgba(237, 129, 40, 0.89)",
        "#d44a3a"
      ],
      "format": "bytes",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 2,
        "w": 12,
        "x": 0,
        "y": 15
      },
      "id": 49,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "maxPerRow": 6,
      "nullPointMode": "connected",
      "nullText": null,
      "options": {},
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "repeat": "interface",
      "repeatDirection": "h",
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": true,
        "lineColor": "rgb(31, 120, 193)",
        "show": true
      },
      "tableColumn": "",
      "targets": [
        {
          "groupBy": [],
          "measurement": "interface",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "ifHCOutOctets"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "non_negative_difference"
              }
            ]
          ],
          "tags": [
            {
              "key": "agent_host",
              "operator": "=~",
              "value": "/^$host$/"
            },
            {
              "condition": "AND",
              "key": "ifDescr",
              "operator": "=~",
              "value": "/^$interface$/"
            }
          ]
        }
      ],
      "thresholds": "",
      "timeFrom": null,
      "timeShift": null,
      "title": "$interface out",
      "type": "singlestat",
      "valueFontSize": "80%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "total"
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 17
      },
      "id": 2,
      "panels": [],
      "repeat": null,
      "title": "Throughput $interface",
      "type": "row"
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "fill": 1,
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 18
      },
      "id": 14,
      "legend": {
        "alignAsTable": true,
        "avg": true,
        "current": true,
        "max": true,
        "min": false,
        "rightSide": false,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "maxPerRow": 3,
      "nullPointMode": "null",
      "options": {},
      "percentage": false,
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "repeat": "interface",
      "repeatDirection": "h",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "$interface $col",
          "groupBy": [
            {
              "params": [
                "$custominterval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "measurement": "interface",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "ifHCInOctets"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              },
              {
                "params": [
                  "1s"
                ],
                "type": "non_negative_derivative"
              },
              {
                "params": [
                  "*8"
                ],
                "type": "math"
              },
              {
                "params": [
                  "in"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "ifHCOutOctets"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              },
              {
                "params": [
                  "1s"
                ],
                "type": "non_negative_derivative"
              },
              {
                "params": [
                  "*8"
                ],
                "type": "math"
              },
              {
                "params": [
                  "out"
                ],
                "type": "alias"
              }
            ]
          ],
          "tags": [
            {
              "key": "agent_host",
              "operator": "=~",
              "value": "/^$host$/"
            },
            {
              "condition": "AND",
              "key": "ifDescr",
              "operator": "=~",
              "value": "/^$interface$/"
            }
          ]
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Throughput $interface",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "bps",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    }
  ],
  "refresh": "1m",
  "schemaVersion": 18,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "auto": true,
        "auto_count": 30,
        "auto_min": "1m",
        "current": {
          "text": "1m",
          "value": "1m"
        },
        "hide": 0,
        "label": null,
        "name": "custominterval",
        "options": [
          {
            "selected": false,
            "text": "auto",
            "value": "$__auto_interval_custominterval"
          },
          {
            "selected": true,
            "text": "1m",
            "value": "1m"
          },
          {
            "selected": false,
            "text": "2m",
            "value": "2m"
          },
          {
            "selected": false,
            "text": "5m",
            "value": "5m"
          },
          {
            "selected": false,
            "text": "10m",
            "value": "10m"
          },
          {
            "selected": false,
            "text": "30m",
            "value": "30m"
          },
          {
            "selected": false,
            "text": "1h",
            "value": "1h"
          },
          {
            "selected": false,
            "text": "6h",
            "value": "6h"
          },
          {
            "selected": false,
            "text": "12h",
            "value": "12h"
          },
          {
            "selected": false,
            "text": "1d",
            "value": "1d"
          },
          {
            "selected": false,
            "text": "7d",
            "value": "7d"
          },
          {
            "selected": false,
            "text": "14d",
            "value": "14d"
          },
          {
            "selected": false,
            "text": "30d",
            "value": "30d"
          }
        ],
        "query": "1m,2m,5m,10m,30m,1h,6h,12h,1d,7d,14d,30d",
        "refresh": 2,
        "skipUrlSync": false,
        "type": "interval"
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_INFLUXDB}",
        "definition": "SHOW TAG VALUES FROM interface WITH KEY = \"agent_host\"",
        "hide": 0,
        "includeAll": false,
        "label": null,
        "multi": false,
        "name": "host",
        "options": [],
        "query": "SHOW TAG VALUES FROM interface WITH KEY = \"agent_host\"",
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_INFLUXDB}",
        "definition": "SHOW TAG VALUES FROM interface WITH KEY = \"ifDescr\" WHERE agent_host=~ /$host$/",
        "hide": 0,
        "includeAll": true,
        "label": null,
        "multi": true,
        "name": "interface",
        "options": [],
        "query": "SHOW TAG VALUES FROM interface WITH KEY = \"ifDescr\" WHERE agent_host=~ /$host$/",
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 3,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": 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"
    ]
  },
  "timezone": "",
  "title": "Network Interface Stats",
  "uid": "VDwuaMSWz",
  "version": 34,
  "description": "Templated dashboard which provides an overview for your router/switch ports and detailed traffic statistics."
}