Grafana dashboard: Cisco ACI
Description: Monitor Cisco ACI via REST API




# CiscoACI_Grafana
Demo about how to monitor Cisco ACI via REST-API with the TIG-Stack (Telegraf, InfluxDB, Grafana).

Visit [GitHub CiscoACI_Grafana](https://github.com/NWMichl/CiscoACI_Grafana "https://github.com/NWMichl/CiscoACI_Grafana") or my blog post over at [NWMichl Blog](https://nwmichl.net/2020/04/19/monitor-cisco-aci-via-rest-api/ "https://nwmichl.net/2020/04/19/monitor-cisco-aci-via-rest-api/") for Telegraf configuration files and full documentation.

## Shell scripts
apic_query.sh and apic_querysig.sh may live in the /etc/telegraf directory and provide a wrapper around the API Call.
Telegraf inputs.http doesn't support cookie handling, so I choose to break out to bash and use inputs.exec to parse the json response. Same for the cert / signature based authentication script, because nobody really wants to manual generate the signature and build the http header cookie by hand. 

    #!/bin/bash
    #
    # Invoke: sh apic_query.sh <APIC-FQDN or IP> <API-Operation> <username> <password>
    # Example: sh apic_query.sh sandboxapicdc.cisco.com /api/class/fabricHealthTotal.json telegraf telegraf
    #
    
    # Pipe bash arguments to variables
    apic=$1
    operation=$2
    user=$3
    pass=$4
    
    # Create random cookie filename to avoid race conditions by multiple, concurrent script executions
    cookiefilename=apic_cookie_$RANDOM
    
    # APIC Login and store session cookie to /etc/telegraf
    curl -s -k -d "<aaaUser name=$user pwd=$pass/>" -c /etc/telegraf/$cookiefilename -X POST https://$apic/api/mo/aaaLogin.xml > /dev/null
    
    # APIC Query Operation using the session cookie
    curl -s -k -X GET https://$apic$operation -b /etc/telegraf/$cookiefilename
    
    # APIC Logout
    curl -s -k -d "<aaaUser name=$user/>" -X POST https://$apic/api/mo/aaaLogout.json -b /etc/telegraf/$cookiefilename > /dev/null

    # Remove session cookie
    rm /etc/telegraf/$cookiefilename

## Telegraf configuration
.conf files live in the /etc/telegraf/telegraf.d directory and query all metrics to populate the Grafana dashboard of this demo

## Grafana 
The Dashboard is a first idea to visualize central Cisco ACI metrics and should help to get started developing own solutions.

{
  "__inputs": [
    {
      "name": "DS_INFLUXDB",
      "label": "InfluxDB",
      "description": "",
      "type": "datasource",
      "pluginId": "influxdb",
      "pluginName": "InfluxDB"
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "6.1.6"
    },
    {
      "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": 12432,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1586680737906,
  "links": [],
  "panels": [
    {
      "cacheTimeout": null,
      "colorBackground": true,
      "colorValue": false,
      "colors": [
        "#C4162A",
        "#FA6400",
        "#37872D"
      ],
      "format": "none",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 4,
        "w": 3,
        "x": 0,
        "y": 0
      },
      "id": 15,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": false
      },
      "tableColumn": "last",
      "targets": [
        {
          "groupBy": [
            {
              "params": [
                "$interval"
              ],
              "type": "time"
            }
          ],
          "measurement": "ACI_SystemHealth",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT last(\"fabricHealthTotal_attributes_cur\") FROM \"ACI_SystemHealth\" WHERE $timeFilter",
          "rawQuery": true,
          "refId": "A",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "fabricHealthTotal_attributes_cur"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              }
            ]
          ],
          "tags": []
        }
      ],
      "thresholds": "50,80",
      "timeFrom": null,
      "timeShift": null,
      "title": "System Health - Current",
      "type": "singlestat",
      "valueFontSize": "80%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": ""
        },
        {
          "op": "=",
          "text": "",
          "value": ""
        }
      ],
      "valueName": "avg"
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": true,
      "colors": [
        "#37872D",
        "#A352CC",
        "#d44a3a"
      ],
      "format": "none",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 4,
        "w": 3,
        "x": 3,
        "y": 0
      },
      "id": 14,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": false
      },
      "tableColumn": "last",
      "targets": [
        {
          "groupBy": [
            {
              "params": [
                "$interval"
              ],
              "type": "time"
            }
          ],
          "measurement": "ACI_Faults",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT last(\"faultCountsWithDetails_attributes_crit\") FROM \"ACI_Faults\" WHERE $timeFilter ",
          "rawQuery": true,
          "refId": "A",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "faultCountsWithDetails_attributes_crit"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              }
            ]
          ],
          "tags": []
        }
      ],
      "thresholds": "1",
      "timeFrom": null,
      "timeShift": null,
      "title": "Critical - Current",
      "type": "singlestat",
      "valueFontSize": "80%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": ""
        },
        {
          "op": "=",
          "text": "",
          "value": ""
        }
      ],
      "valueName": "avg"
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": true,
      "colors": [
        "#299c46",
        "#E02F44",
        "#d44a3a"
      ],
      "format": "none",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 4,
        "w": 3,
        "x": 6,
        "y": 0
      },
      "id": 27,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": false
      },
      "tableColumn": "last",
      "targets": [
        {
          "groupBy": [],
          "measurement": "ACI_Faults",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT last(\"faultCountsWithDetails_attributes_maj\") FROM \"ACI_Faults\" WHERE $timeFilter",
          "rawQuery": true,
          "refId": "A",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "faultCountsWithDetails_attributes_maj"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              }
            ]
          ],
          "tags": []
        }
      ],
      "thresholds": "1",
      "timeFrom": null,
      "timeShift": null,
      "title": "Major - Current",
      "type": "singlestat",
      "valueFontSize": "80%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": ""
        },
        {
          "op": "=",
          "text": "",
          "value": ""
        }
      ],
      "valueName": "avg"
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": true,
      "colors": [
        "#299c46",
        "#FF780A",
        "#d44a3a"
      ],
      "format": "none",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 4,
        "w": 3,
        "x": 9,
        "y": 0
      },
      "id": 28,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": false
      },
      "tableColumn": "last",
      "targets": [
        {
          "groupBy": [],
          "measurement": "ACI_Faults",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT last(\"faultCountsWithDetails_attributes_minor\") FROM \"ACI_Faults\" WHERE $timeFilter",
          "rawQuery": true,
          "refId": "A",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "faultCountsWithDetails_attributes_minor"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              }
            ]
          ],
          "tags": []
        }
      ],
      "thresholds": "1",
      "timeFrom": null,
      "timeShift": null,
      "title": "Minor - Current",
      "type": "singlestat",
      "valueFontSize": "80%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": ""
        },
        {
          "op": "=",
          "text": "",
          "value": ""
        }
      ],
      "valueName": "avg"
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": true,
      "colors": [
        "#299c46",
        "#3274D9",
        "#d44a3a"
      ],
      "format": "none",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 4,
        "w": 3,
        "x": 12,
        "y": 0
      },
      "id": 29,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": false
      },
      "tableColumn": "last",
      "targets": [
        {
          "groupBy": [],
          "measurement": "ACI_Faults",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT \"infraWiNode_attributes_health\" FROM \"ACI_APIC\" WHERE (\"apic\" = 'sandboxapicdc.cisco.com') AND time > now() - 3m limit 1",
          "rawQuery": false,
          "refId": "A",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "faultCountsWithDetails_attributes_warn"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              }
            ]
          ],
          "tags": []
        }
      ],
      "thresholds": "1",
      "timeFrom": null,
      "timeShift": null,
      "title": "Warning - Current",
      "type": "singlestat",
      "valueFontSize": "80%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": ""
        },
        {
          "op": "=",
          "text": "",
          "value": ""
        }
      ],
      "valueName": "avg"
    },
    {
      "columns": [],
      "datasource": "${DS_INFLUXDB}",
      "fontSize": "100%",
      "gridPos": {
        "h": 4,
        "w": 9,
        "x": 15,
        "y": 0
      },
      "id": 2,
      "links": [],
      "pageSize": null,
      "scroll": true,
      "showHeader": true,
      "sort": {
        "col": 0,
        "desc": true
      },
      "styles": [
        {
          "alias": "Time",
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "pattern": "Time",
          "type": "hidden"
        },
        {
          "alias": "Health",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "decimals": 2,
          "mappingType": 1,
          "pattern": "ACI_APIC.Health",
          "thresholds": [],
          "type": "string",
          "unit": "short",
          "valueMaps": [
            {
              "text": "",
              "value": ""
            }
          ]
        },
        {
          "alias": "Name",
          "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": 2,
          "mappingType": 1,
          "pattern": "infraWiNode_attributes_nodeName",
          "thresholds": [],
          "type": "number",
          "unit": "short"
        },
        {
          "alias": "Address",
          "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": 2,
          "mappingType": 1,
          "pattern": "infraWiNode_attributes_addr",
          "thresholds": [],
          "type": "number",
          "unit": "short"
        }
      ],
      "targets": [
        {
          "groupBy": [
            {
              "params": [
                "infraWiNode_attributes_nodeName"
              ],
              "type": "tag"
            },
            {
              "params": [
                "infraWiNode_attributes_addr"
              ],
              "type": "tag"
            }
          ],
          "limit": "1",
          "measurement": "ACI_APIC",
          "orderByTime": "DESC",
          "policy": "default",
          "query": "SELECT \"infraWiNode_attributes_apicMode\" AS \"Mode\", \"infraWiNode_attributes_health\" AS \"Health\", \"infraWiNode_attributes_failoverStatus\" AS \"FailoverStatus\", \"infraWiNode_attributes_adminSt\" AS \"AdminStatus\", \"infraWiNode_attributes_operSt\" AS \"OperStatus\" FROM \"ACI_APIC\" WHERE time = now() -10m ",
          "rawQuery": false,
          "refId": "A",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "infraWiNode_attributes_apicMode"
                ],
                "type": "field"
              },
              {
                "params": [
                  "Mode"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "infraWiNode_attributes_health"
                ],
                "type": "field"
              },
              {
                "params": [
                  "Health"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "infraWiNode_attributes_failoverStatus"
                ],
                "type": "field"
              },
              {
                "params": [
                  "FailoverStatus"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "infraWiNode_attributes_adminSt"
                ],
                "type": "field"
              },
              {
                "params": [
                  "AdminStatus"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "infraWiNode_attributes_operSt"
                ],
                "type": "field"
              },
              {
                "params": [
                  "OperStatus"
                ],
                "type": "alias"
              }
            ]
          ],
          "tags": [
            {
              "key": "apic",
              "operator": "=",
              "value": "sandboxapicdc.cisco.com"
            }
          ]
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "APIC Status",
      "transform": "table",
      "transparent": true,
      "type": "table"
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "fill": 2,
      "gridPos": {
        "h": 7,
        "w": 12,
        "x": 0,
        "y": 4
      },
      "id": 4,
      "legend": {
        "avg": true,
        "current": false,
        "max": true,
        "min": true,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "connected",
      "percentage": false,
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "alias": "ACI_SystemHealth.Current",
          "color": "#1F60C4"
        }
      ],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "measurement": "ACI_SystemHealth",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "fabricHealthTotal_attributes_cur"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              },
              {
                "params": [
                  "Current"
                ],
                "type": "alias"
              }
            ]
          ],
          "tags": []
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "System Health",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "transparent": true,
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "decimals": null,
          "format": "none",
          "label": null,
          "logBase": 1,
          "max": "100",
          "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,
      "fill": 2,
      "gridPos": {
        "h": 7,
        "w": 12,
        "x": 12,
        "y": 4
      },
      "id": 8,
      "interval": "",
      "legend": {
        "alignAsTable": false,
        "avg": true,
        "current": false,
        "max": true,
        "min": true,
        "rightSide": false,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 0,
      "links": [],
      "nullPointMode": "connected",
      "percentage": false,
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "alias": "ACI_Faults.critical",
          "color": "#B877D9",
          "linewidth": 1,
          "zindex": 3
        },
        {
          "alias": "ACI_Faults.major",
          "color": "#F2495C",
          "linewidth": 1,
          "zindex": 2
        },
        {
          "alias": "ACI_Faults.minor",
          "color": "#FF9830",
          "linewidth": 1,
          "zindex": 1
        },
        {
          "alias": "ACI_Faults.warning",
          "color": "#1F60C4"
        }
      ],
      "spaceLength": 10,
      "stack": true,
      "steppedLine": false,
      "targets": [
        {
          "alias": "",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "measurement": "ACI_Faults",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "faultCountsWithDetails_attributes_crit"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              },
              {
                "params": [
                  "critical"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "faultCountsWithDetails_attributes_maj"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              },
              {
                "params": [
                  "major"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "faultCountsWithDetails_attributes_minor"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              },
              {
                "params": [
                  "minor"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "faultCountsWithDetails_attributes_warn"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              },
              {
                "params": [
                  "warning"
                ],
                "type": "alias"
              }
            ]
          ],
          "tags": []
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "System Faults",
      "tooltip": {
        "shared": true,
        "sort": 2,
        "value_type": "individual"
      },
      "transparent": true,
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "short",
          "label": "",
          "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
      }
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 11
      },
      "id": 18,
      "panels": [],
      "title": "Tenant",
      "type": "row"
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "fill": 0,
      "gridPos": {
        "h": 7,
        "w": 12,
        "x": 0,
        "y": 12
      },
      "id": 10,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": false,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "connected",
      "percentage": false,
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "alias": "/fvTenant/",
          "color": "#1F60C4",
          "legend": false
        },
        {
          "alias": "ACI_TenantHealth.H {fvTenant_attributes_name: mgmt}",
          "color": "#8F3BB8",
          "legend": true,
          "zindex": 1
        },
        {
          "alias": "ACI_TenantHealth.H {fvTenant_attributes_name: common}",
          "color": "#C4162A",
          "legend": true,
          "zindex": 1
        },
        {
          "alias": "ACI_TenantHealth.H {fvTenant_attributes_name: infra}",
          "color": "#FA6400",
          "legend": true,
          "zindex": 2
        }
      ],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "fvTenant_attributes_name"
              ],
              "type": "tag"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "measurement": "ACI_TenantHealth",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "fvTenant_children_0_healthInst_attributes_cur"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              },
              {
                "params": [
                  "H"
                ],
                "type": "alias"
              }
            ]
          ],
          "tags": []
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Tenant Health",
      "tooltip": {
        "shared": true,
        "sort": 1,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "decimals": null,
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": "100",
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "cacheTimeout": null,
      "colorBackground": true,
      "colorValue": false,
      "colors": [
        "#C4162A",
        "#FA6400",
        "#37872D"
      ],
      "format": "none",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 4,
        "w": 3,
        "x": 12,
        "y": 12
      },
      "id": 25,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": false
      },
      "tableColumn": "count_Health",
      "targets": [
        {
          "groupBy": [],
          "limit": "",
          "measurement": "ACI_TenantHealth",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT last(\"fvTenant_children_0_healthInst_attributes_cur\") FROM \"ACI_TenantHealth\" WHERE (\"fvTenant_attributes_name\" = 'infra') AND $timeFilter",
          "rawQuery": false,
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "fvTenant_children_0_healthInst_attributes_cur"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [
                  "Current"
                ],
                "type": "alias"
              }
            ]
          ],
          "tags": [
            {
              "key": "fvTenant_attributes_name",
              "operator": "=",
              "value": "infra"
            }
          ]
        }
      ],
      "thresholds": "50,80",
      "timeFrom": null,
      "timeShift": null,
      "title": "Infra - Current",
      "type": "singlestat",
      "valueFontSize": "80%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "cacheTimeout": null,
      "colorBackground": true,
      "colorValue": false,
      "colors": [
        "#C4162A",
        "#FA6400",
        "#37872D"
      ],
      "format": "none",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 4,
        "w": 3,
        "x": 15,
        "y": 12
      },
      "id": 31,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": false
      },
      "tableColumn": "count_Health",
      "targets": [
        {
          "groupBy": [],
          "limit": "",
          "measurement": "ACI_TenantHealth",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT last(\"fvTenant_children_0_healthInst_attributes_cur\") FROM \"ACI_TenantHealth\" WHERE (\"fvTenant_attributes_name\" = 'infra') AND $timeFilter",
          "rawQuery": false,
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "fvTenant_children_0_healthInst_attributes_cur"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [
                  "Current"
                ],
                "type": "alias"
              }
            ]
          ],
          "tags": [
            {
              "key": "fvTenant_attributes_name",
              "operator": "=",
              "value": "common"
            }
          ]
        }
      ],
      "thresholds": "50,80",
      "timeFrom": null,
      "timeShift": null,
      "title": "Common - Current",
      "type": "singlestat",
      "valueFontSize": "80%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "columns": [],
      "fontSize": "100%",
      "gridPos": {
        "h": 7,
        "w": 6,
        "x": 18,
        "y": 12
      },
      "id": 20,
      "links": [],
      "pageSize": null,
      "scroll": true,
      "showHeader": true,
      "sort": {
        "col": 2,
        "desc": false
      },
      "styles": [
        {
          "alias": "Latest Measurement",
          "dateFormat": "MM/DD hh:mm:ss",
          "pattern": "Time",
          "type": "date"
        },
        {
          "alias": "",
          "colorMode": "cell",
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "decimals": 0,
          "pattern": "Health",
          "thresholds": [
            "50",
            "80"
          ],
          "type": "number",
          "unit": "short"
        },
        {
          "alias": "Name",
          "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": 2,
          "mappingType": 1,
          "pattern": "fvTenant_attributes_name",
          "thresholds": [],
          "type": "number",
          "unit": "short"
        }
      ],
      "targets": [
        {
          "groupBy": [
            {
              "params": [
                "fvTenant_attributes_name"
              ],
              "type": "tag"
            }
          ],
          "measurement": "ACI_TenantHealth",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT last(\"fvTenant_children_0_healthInst_attributes_cur\") AS \"Health\" FROM \"ACI_TenantHealth\" WHERE $timeFilter GROUP BY \"fvTenant_attributes_name\"",
          "rawQuery": true,
          "refId": "A",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "fvTenant_children_0_healthInst_attributes_cur"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [
                  "Health"
                ],
                "type": "alias"
              }
            ]
          ],
          "tags": []
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Tenant Health",
      "transform": "table",
      "type": "table"
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": false,
      "colors": [
        "#299c46",
        "rgba(237, 129, 40, 0.89)",
        "#d44a3a"
      ],
      "format": "none",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 3,
        "w": 6,
        "x": 12,
        "y": 16
      },
      "id": 30,
      "interval": null,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "nullText": null,
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": false
      },
      "tableColumn": "count_Health",
      "targets": [
        {
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "fvTenant_attributes_name"
              ],
              "type": "tag"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "limit": "1",
          "measurement": "ACI_TenantHealth",
          "orderByTime": "DESC",
          "policy": "default",
          "query": "SELECT count(*) FROM(SELECT last(\"fvTenant_children_0_healthInst_attributes_cur\") AS \"Health\" FROM \"ACI_TenantHealth\" WHERE time > now() - 3m GROUP BY \"fvTenant_attributes_name\")",
          "rawQuery": true,
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "fvTenant_children_0_healthInst_attributes_cur"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              }
            ]
          ],
          "tags": []
        }
      ],
      "thresholds": "",
      "timeFrom": null,
      "timeShift": null,
      "title": "Tenant Count - Current",
      "type": "singlestat",
      "valueFontSize": "80%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 19
      },
      "id": 22,
      "panels": [],
      "title": "Node",
      "type": "row"
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "fill": 0,
      "gridPos": {
        "h": 7,
        "w": 12,
        "x": 0,
        "y": 20
      },
      "id": 23,
      "legend": {
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "show": false,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "connected",
      "percentage": false,
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "alias": "/spine/",
          "color": "#FA6400",
          "legend": true,
          "zindex": 1
        },
        {
          "alias": "/leaf/",
          "color": "#3274D9",
          "legend": true,
          "zindex": 2
        }
      ],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "topSystem_attributes_name"
              ],
              "type": "tag"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "measurement": "ACI_NodeHealth",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "topSystem_children_0_healthInst_attributes_cur"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              },
              {
                "params": [
                  "Current"
                ],
                "type": "alias"
              }
            ]
          ],
          "tags": []
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Node Health",
      "tooltip": {
        "shared": true,
        "sort": 1,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "decimals": null,
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": "100",
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "columns": [],
      "fontSize": "100%",
      "gridPos": {
        "h": 7,
        "w": 12,
        "x": 12,
        "y": 20
      },
      "id": 12,
      "links": [],
      "pageSize": null,
      "scroll": true,
      "showHeader": true,
      "sort": {
        "col": 7,
        "desc": false
      },
      "styles": [
        {
          "alias": "Latest Measurement",
          "dateFormat": "MM/DD hh:mm:ss",
          "pattern": "Time",
          "type": "date"
        },
        {
          "alias": "Name",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "decimals": 2,
          "pattern": "topSystem_attributes_name",
          "thresholds": [],
          "type": "number",
          "unit": "short"
        },
        {
          "alias": "OOB-Mgmt-IP",
          "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": 2,
          "mappingType": 1,
          "pattern": "topSystem_attributes_oobMgmtAddr",
          "thresholds": [],
          "type": "number",
          "unit": "short"
        },
        {
          "alias": "Pod-ID",
          "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": 2,
          "mappingType": 1,
          "pattern": "topSystem_attributes_podId",
          "thresholds": [],
          "type": "number",
          "unit": "short"
        },
        {
          "alias": "Role",
          "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": 2,
          "mappingType": 1,
          "pattern": "topSystem_attributes_role",
          "thresholds": [],
          "type": "number",
          "unit": "short"
        },
        {
          "alias": "",
          "colorMode": "cell",
          "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": "Health",
          "thresholds": [
            "50",
            "80"
          ],
          "type": "number",
          "unit": "short"
        },
        {
          "alias": "",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "DD:HH:mm:ss.SSS",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "UpTime",
          "thresholds": [],
          "type": "string",
          "unit": "short"
        }
      ],
      "targets": [
        {
          "groupBy": [
            {
              "params": [
                "topSystem_attributes_name"
              ],
              "type": "tag"
            },
            {
              "params": [
                "topSystem_attributes_oobMgmtAddr"
              ],
              "type": "tag"
            },
            {
              "params": [
                "topSystem_attributes_podId"
              ],
              "type": "tag"
            },
            {
              "params": [
                "topSystem_attributes_role"
              ],
              "type": "tag"
            }
          ],
          "measurement": "ACI_NodeHealth",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT last(\"topSystem_attributes_state\") AS \"state\", \"topSystem_attributes_systemUpTime\" AS \"UpTime\", \"topSystem_children_0_healthInst_attributes_cur\" AS \"Health\" FROM \"ACI_NodeHealth\" WHERE $timeFilter GROUP BY \"topSystem_attributes_name\", \"topSystem_attributes_oobMgmtAddr\", \"topSystem_attributes_podId\", \"topSystem_attributes_role\"",
          "rawQuery": true,
          "refId": "A",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "topSystem_attributes_state"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "last"
              },
              {
                "params": [
                  "state"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "topSystem_attributes_systemUpTime"
                ],
                "type": "field"
              },
              {
                "params": [
                  "UpTime"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "topSystem_children_0_healthInst_attributes_cur"
                ],
                "type": "field"
              },
              {
                "params": [
                  "Health"
                ],
                "type": "alias"
              }
            ]
          ],
          "tags": []
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Node Status",
      "transform": "table",
      "type": "table"
    }
  ],
  "refresh": "30s",
  "schemaVersion": 18,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_INFLUXDB}",
        "definition": "SHOW TAG VALUES FROM ACI_APIC WITH KEY=apic",
        "hide": 0,
        "includeAll": false,
        "label": "APIC Cluster",
        "multi": false,
        "name": "APICCluster",
        "options": [],
        "query": "SHOW TAG VALUES FROM ACI_APIC WITH KEY=apic",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-3h",
    "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": "Cisco ACI",
  "uid": "0NcBm8kRz",
  "version": 8,
  "description": "Monitor Cisco ACI via REST API\r\n\r\n\r\n"
}