Grafana dashboard: Cisco Catalyst 9800 - Client Stats
Description: Cisco Catalyst 9800 IOS XE Wireless - gRPC Model Driven Telemetry - Client Stats

Reference: https://www.wifireference.com/2020/01/14/viewing-network-telemetry-from-the-catalyst-9800-with-grafana/


# telegraf.conf
```
# Cisco Telemetry MDT - gRPC Dial-Out Telemetry Listener
[[inputs.cisco_telemetry_mdt]]
  transport = "grpc"
  service_address = ":57500"

# Output Plugin InfluxDB
[[outputs.influxdb]]
  database = "cisco_telemetry_mdt_grpc"
  urls = [ "http://127.0.0.1:8086" ]
```

# IOS XE CLI Configuration
The following CLI can be added to IOS XE 17.1+ to enable the publication of Model Driven Telemetry. Be sure to update the source and destination IP addresses
```
netconf-yang
```

```
telemetry ietf subscription 1
 encoding encode-kvgpb
 filter xpath /wireless-client-oper:client-oper-data/dot11-oper-data
 source-address 10.10.10.92
 stream yang-push
 update-policy periodic 3000
 receiver ip address 10.10.10.49 57500 protocol grpc-tcp

telemetry ietf subscription 2
 encoding encode-kvgpb
 filter xpath /wireless-client-oper:client-oper-data/traffic-stats
 source-address 10.10.10.92
 stream yang-push
 update-policy periodic 3000
 receiver ip address 10.10.10.49 57500 protocol grpc-tcp

telemetry ietf subscription 3
...
```

## Create additional telemetry configurations for each filter xpath:
```
filter xpath /wireless-client-oper:client-oper-data/dot11-oper-data
filter xpath /wireless-client-oper:client-oper-data/traffic-stats
filter xpath /wireless-client-oper:client-oper-data/dc-info
filter xpath /wireless-client-oper:client-oper-data/sisf-db-mac
filter xpath /wireless-client-oper:client-oper-data/client-wsa-info
filter xpath /wireless-access-point-oper:access-point-oper-data/radio-oper-stats
filter xpath /wireless-access-point-oper:access-point-oper-data/ap-name-mac-map
filter xpath /wireless-access-point-oper:access-point-oper-data/capwap-data
filter xpath /wireless-access-point-oper:access-point-oper-data/radio-oper-data
filter xpath /wireless-access-point-oper:access-point-oper-data/ssid-counters
filter xpath /wireless-client-oper:client-oper-data/common-oper-data
filter xpath /wireless-rrm-oper:rrm-oper-data/rrm-measurement
filter xpath /wireless-mobility-oper:mobility-oper-data/mobility-node-data
filter xpath /wireless-mobility-oper:mobility-oper-data/wlan-client-limit
filter xpath /wireless-access-point-oper:access-point-oper-data
filter xpath /wireless-client-oper:client-oper-data
filter xpath /wireless-location-oper:location-oper-data
```

{
  "__inputs": [
    {
      "name": "DS_CISCO_TELEMETRY_MDT_GRPC",
      "label": "cisco_telemetry_mdt_grpc",
      "description": "",
      "type": "datasource",
      "pluginId": "influxdb",
      "pluginName": "InfluxDB"
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "6.7.2"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "influxdb",
      "name": "InfluxDB",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "stat",
      "name": "Stat",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "$$hashKey": "object:611",
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "description": "Cisco Catalyst 9800 IOS XE Wireless - gRPC Model Driven Telemetry - Client Stats",
  "editable": true,
  "gnetId": 12468,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1592063637391,
  "links": [],
  "panels": [
    {
      "aliasColors": {
        "RSSI": "semi-dark-blue"
      },
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_CISCO_TELEMETRY_MDT_GRPC}",
      "decimals": 0,
      "fill": 1,
      "fillGradient": 2,
      "gridPos": {
        "h": 8,
        "w": 7,
        "x": 0,
        "y": 0
      },
      "hiddenSeries": false,
      "id": 2,
      "legend": {
        "alignAsTable": true,
        "avg": true,
        "current": true,
        "max": true,
        "min": true,
        "rightSide": false,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 2,
      "nullPointMode": "connected",
      "options": {
        "dataLinks": []
      },
      "percentage": false,
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "alias": "SNR",
          "linewidth": 2,
          "yaxis": 2
        },
        {
          "alias": "RSSI",
          "yaxis": 1
        }
      ],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "$col",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "measurement": "Cisco-IOS-XE-wireless-client-oper:client-oper-data/traffic-stats",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "B",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "most_recent_rssi"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              },
              {
                "params": [
                  "RSSI"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "most_recent_snr"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              },
              {
                "params": [
                  10
                ],
                "type": "moving_average"
              },
              {
                "params": [
                  "SNR"
                ],
                "type": "alias"
              }
            ]
          ],
          "tags": [
            {
              "key": "ms_mac_address",
              "operator": "=~",
              "value": "/^$Clients$/"
            }
          ]
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Client RSSI SNR for $Clients",
      "tooltip": {
        "shared": false,
        "sort": 0,
        "value_type": "individual"
      },
      "transparent": true,
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "decimals": 0,
          "format": "dBm",
          "label": "RSSI",
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "decimals": 0,
          "format": "dB",
          "label": "SNR",
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {
        "RSSI": "semi-dark-blue",
        "Speed": "semi-dark-orange"
      },
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_CISCO_TELEMETRY_MDT_GRPC}",
      "decimals": 0,
      "fill": 1,
      "fillGradient": 2,
      "gridPos": {
        "h": 8,
        "w": 7,
        "x": 7,
        "y": 0
      },
      "hiddenSeries": false,
      "id": 5,
      "legend": {
        "alignAsTable": true,
        "avg": true,
        "current": true,
        "max": true,
        "min": true,
        "rightSide": false,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 2,
      "nullPointMode": "connected",
      "options": {
        "dataLinks": []
      },
      "percentage": false,
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "$col",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "measurement": "Cisco-IOS-XE-wireless-client-oper:client-oper-data/traffic-stats",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "speed"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              },
              {
                "params": [
                  "Speed"
                ],
                "type": "alias"
              }
            ]
          ],
          "tags": [
            {
              "key": "ms_mac_address",
              "operator": "=~",
              "value": "/^$Clients$/"
            }
          ]
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Data Rate for $Clients",
      "tooltip": {
        "shared": false,
        "sort": 0,
        "value_type": "individual"
      },
      "transparent": true,
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "decimals": 0,
          "format": "short",
          "label": "Speed",
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_CISCO_TELEMETRY_MDT_GRPC}",
      "decimals": 0,
      "fill": 1,
      "fillGradient": 2,
      "gridPos": {
        "h": 8,
        "w": 7,
        "x": 14,
        "y": 0
      },
      "hiddenSeries": false,
      "id": 3,
      "legend": {
        "alignAsTable": true,
        "avg": true,
        "current": true,
        "max": true,
        "min": false,
        "rightSide": false,
        "show": true,
        "total": true,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "connected",
      "options": {
        "dataLinks": []
      },
      "percentage": false,
      "pluginVersion": "6.6.2",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "alias": "$col",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "measurement": "Cisco-IOS-XE-wireless-client-oper:client-oper-data/traffic-stats",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "bytes_rx"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [
                  "RX"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "bytes_tx"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [
                  "TX"
                ],
                "type": "alias"
              }
            ]
          ],
          "tags": [
            {
              "key": "ms_mac_address",
              "operator": "=~",
              "value": "/^$Clients$/"
            }
          ]
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "bytes RX & TX for $Clients",
      "tooltip": {
        "shared": false,
        "sort": 0,
        "value_type": "individual"
      },
      "transparent": true,
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "decimals": 0,
          "format": "decbytes",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "datasource": "${DS_CISCO_TELEMETRY_MDT_GRPC}",
      "gridPos": {
        "h": 4,
        "w": 22,
        "x": 0,
        "y": 8
      },
      "id": 4,
      "options": {
        "colorMode": "value",
        "fieldOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "defaults": {
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "semi-dark-purple",
                  "value": null
                }
              ]
            }
          },
          "overrides": [],
          "values": false
        },
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto"
      },
      "pluginVersion": "6.7.2",
      "targets": [
        {
          "alias": "$col",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "measurement": "Cisco-IOS-XE-wireless-client-oper:client-oper-data/traffic-stats",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "most_recent_rssi"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [
                  "RSSI"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "most_recent_snr"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [
                  "SNR"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "spatial_stream"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [
                  "Spatial Streams"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "tx_retries"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [
                  "tx retries"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "data_retries"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [
                  "data retries"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "speed"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [
                  "data rate"
                ],
                "type": "alias"
              }
            ]
          ],
          "tags": [
            {
              "key": "ms_mac_address",
              "operator": "=~",
              "value": "/^$Clients$/"
            }
          ]
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Client Info for $Clients",
      "transparent": true,
      "type": "stat"
    },
    {
      "datasource": "${DS_CISCO_TELEMETRY_MDT_GRPC}",
      "gridPos": {
        "h": 7,
        "w": 22,
        "x": 0,
        "y": 12
      },
      "id": 6,
      "options": {
        "colorMode": "value",
        "fieldOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "defaults": {
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "semi-dark-blue",
                  "value": null
                }
              ]
            }
          },
          "overrides": [],
          "values": false
        },
        "graphMode": "none",
        "justifyMode": "center",
        "orientation": "auto"
      },
      "pluginVersion": "6.7.2",
      "targets": [
        {
          "alias": "$col",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "measurement": "Cisco-IOS-XE-wireless-client-oper:client-oper-data/common-oper-data",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "ap_name"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [
                  "AP"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "client_type"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [
                  "type"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "co_state"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [
                  "State"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "ms_radio_type"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [
                  "Radio Type"
                ],
                "type": "alias"
              }
            ]
          ],
          "tags": [
            {
              "key": "client_mac",
              "operator": "=~",
              "value": "/^$Clients$/"
            }
          ]
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": " ",
      "transparent": true,
      "type": "stat"
    },
    {
      "datasource": "${DS_CISCO_TELEMETRY_MDT_GRPC}",
      "gridPos": {
        "h": 3,
        "w": 22,
        "x": 0,
        "y": 19
      },
      "id": 7,
      "options": {
        "colorMode": "value",
        "fieldOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "defaults": {
            "mappings": [],
            "thresholds": {
              "mode": "absolute",
              "steps": [
                {
                  "color": "light-orange",
                  "value": null
                }
              ]
            }
          },
          "overrides": [],
          "values": false
        },
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "auto"
      },
      "pluginVersion": "6.7.2",
      "targets": [
        {
          "alias": "$col",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "measurement": "Cisco-IOS-XE-wireless-client-oper:client-oper-data/dot11-oper-data",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "ms_apple_capable"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [
                  "Apple Fast Lane?"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "vap_ssid"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [
                  "SSID"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "dms_capable"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [
                  "80211v DMS?"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "current_channel"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [
                  "Channel"
                ],
                "type": "alias"
              }
            ]
          ],
          "tags": [
            {
              "key": "ms_mac_address",
              "operator": "=~",
              "value": "/^$Clients$/"
            }
          ]
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": " ",
      "transparent": true,
      "type": "stat"
    }
  ],
  "refresh": false,
  "schemaVersion": 22,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_CISCO_TELEMETRY_MDT_GRPC}",
        "definition": "show tag values with key = \"ms_mac_address\"",
        "hide": 0,
        "includeAll": false,
        "index": -1,
        "label": null,
        "multi": false,
        "name": "Clients",
        "options": [],
        "query": "show tag values with key = \"ms_mac_address\"",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-15m",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ]
  },
  "timezone": "",
  "title": "Cisco Catalyst 9800 - Client Stats",
  "uid": "w-AquSRGz",
  "variables": {
    "list": []
  },
  "version": 14
}