Grafana dashboard: Mellanox - What Just Happened? Layer 1 Events
Description: The Layer 1 dashboard provides real-time pane to view events and dropped packets caused by Layer 1 errors

[Deploying Mellanox What-Just-Happen dashboards on Grafana](https://github.com/Mellanox/wjhgraf/wiki/Deploying-Mellanox-What-Just-Happen-dashboards-on-Grafana) 

{
  "__inputs": [
    {
      "name": "DS_TELEGRAF",
      "label": "telegraf",
      "description": "",
      "type": "datasource",
      "pluginId": "influxdb",
      "pluginName": "InfluxDB"
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "6.0.2"
    },
    {
      "type": "panel",
      "id": "grafana-piechart-panel",
      "name": "Pie Chart",
      "version": "1.3.6"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": "5.0.0"
    },
    {
      "type": "datasource",
      "id": "influxdb",
      "name": "InfluxDB",
      "version": "5.0.0"
    },
    {
      "type": "panel",
      "id": "singlestat",
      "name": "Singlestat",
      "version": "5.0.0"
    },
    {
      "type": "panel",
      "id": "table",
      "name": "Table",
      "version": "5.0.0"
    },
    {
      "type": "panel",
      "id": "text",
      "name": "Text",
      "version": "5.0.0"
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "editable": false,
  "gnetId": 11226,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1574156314919,
  "links": [],
  "panels": [
    {
      "content": "<center><a href=\"http://www.mellanox.com\" target=\"_new\"><img width=\"150px\" src=\"http://www.mellanox.com/img/news/media_kit/logo/white/mellanox-logo-square-white.png\"></a></center>\n\n\n",
      "gridPos": {
        "h": 5,
        "w": 3,
        "x": 0,
        "y": 0
      },
      "id": 13,
      "links": [],
      "mode": "html",
      "timeFrom": null,
      "timeShift": null,
      "title": "",
      "transparent": true,
      "type": "text"
    },
    {
      "content": "<h1><b><br>Mellanox Event Telemetry - What Just Happened? - Layer 1 Events</b></h1>\n<a href=\"/d/XiWyzYZWk/mellanox-what-just-happened-monitoring\">Go to Monitoring Dashboard</a><br>\n<a href=\"/d/enfsjBWZk/mellanox-what-just-happened-debug\">Go to Debug Dashboard</a>",
      "gridPos": {
        "h": 5,
        "w": 15,
        "x": 3,
        "y": 0
      },
      "id": 15,
      "links": [],
      "mode": "html",
      "timeFrom": null,
      "timeShift": null,
      "title": "",
      "transparent": true,
      "type": "text"
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorPostfix": false,
      "colorPrefix": false,
      "colorValue": false,
      "colors": [
        "#299c46",
        "rgba(237, 129, 40, 0.89)",
        "#d44a3a"
      ],
      "datasource": "${DS_TELEGRAF}",
      "format": "locale",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 5,
        "w": 5,
        "x": 18,
        "y": 0
      },
      "id": 9,
      "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": "100%",
      "prefix": "",
      "prefixFontSize": "100%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": true,
        "lineColor": "rgb(31, 120, 193)",
        "show": true
      },
      "tableColumn": "",
      "targets": [
        {
          "alias": "",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "hide": false,
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT  count(crcErrorCount) as value FROM \"WJHAggregated\" WHERE \"deviceIP\"=~ /^$deviceIP$/ and \"ingressPort\"=~ /^$ingressPort$/ and \"portDownReason\"=~ /^$portDownReason$/ and ($timeFilter)",
          "rawQuery": true,
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "tags": []
        }
      ],
      "thresholds": "",
      "timeFrom": null,
      "timeShift": null,
      "title": "Layer 1 Events",
      "transparent": true,
      "type": "singlestat",
      "valueFontSize": "200%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "total"
    },
    {
      "aliasColors": {
        "Auto-negotiation failure": "#FADE2A",
        "Cable/transceiver is unplugged": "#F2495C"
      },
      "breakPoint": "75%",
      "cacheTimeout": null,
      "combine": {
        "label": "Others",
        "threshold": 0
      },
      "datasource": "${DS_TELEGRAF}",
      "fontSize": "80%",
      "format": "short",
      "gridPos": {
        "h": 8,
        "w": 17,
        "x": 2,
        "y": 5
      },
      "id": 19,
      "interval": null,
      "legend": {
        "percentage": true,
        "percentageDecimals": null,
        "show": true,
        "sideWidth": null,
        "values": false
      },
      "legendType": "Right side",
      "links": [],
      "maxDataPoints": 3,
      "nullPointMode": "connected",
      "pieType": "donut",
      "strokeWidth": 1,
      "targets": [
        {
          "alias": "$tag_portDownReason",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT count(\"crcErrorCount\") FROM \"WJHAggregated\" WHERE \"deviceIP\"=~ /^$deviceIP$/ and \"ingressPort\"=~ /^$ingressPort$/ and \"portDownReason\"=~ /^$portDownReason$/ and ($timeFilter) GROUP BY portDownReason",
          "rawQuery": true,
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "tags": []
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Drop Down Reason",
      "transparent": true,
      "type": "grafana-piechart-panel",
      "valueName": "current"
    },
    {
      "aliasColors": {},
      "bars": true,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_TELEGRAF}",
      "fill": 1,
      "gridPos": {
        "h": 3,
        "w": 23,
        "x": 0,
        "y": 13
      },
      "id": 17,
      "legend": {
        "alignAsTable": false,
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "rightSide": true,
        "show": false,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "paceLength": 10,
      "percentage": false,
      "pointradius": 0.5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "stack": true,
      "steppedLine": false,
      "targets": [
        {
          "alias": "Buffer Drops",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT count(\"crcErrorCount\") FROM \"WJHAggregated\" WHERE \"deviceIP\"=~ /^$deviceIP$/ and \"ingressPort\"=~ /^$ingressPort$/ and \"portDownReason\"=~ /^$portDownReason$/ and ($timeFilter) GROUP BY time($__interval) fill(null)",
          "rawQuery": true,
          "refId": "D",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "tags": []
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Dropped Packets due to Layer 1 Errors",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "transparent": true,
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "decimals": null,
          "format": "short",
          "label": "",
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "cacheTimeout": null,
      "columns": [],
      "datasource": "${DS_TELEGRAF}",
      "fontSize": "100%",
      "gridPos": {
        "h": 16,
        "w": 23,
        "x": 0,
        "y": 16
      },
      "id": 2,
      "links": [],
      "maxPerRow": 2,
      "pageSize": 20,
      "repeat": null,
      "repeatDirection": "v",
      "scroll": true,
      "showHeader": true,
      "sort": {
        "col": null,
        "desc": false
      },
      "styles": [
        {
          "alias": "Time",
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "pattern": "Time",
          "type": "date"
        },
        {
          "alias": "From Time",
          "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.SSS",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "fromTimestamp",
          "preserveFormat": true,
          "sanitize": false,
          "thresholds": [],
          "type": "hidden",
          "unit": "short",
          "valueMaps": [
            {
              "text": "ACL",
              "value": "aclDrop"
            },
            {
              "text": "Buffer",
              "value": "bufferDrop"
            },
            {
              "text": "Forwarding",
              "value": "fwdDrop"
            }
          ]
        },
        {
          "alias": "To Time",
          "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.SSS",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "toTimestamp",
          "preserveFormat": true,
          "thresholds": [],
          "type": "hidden",
          "unit": "short"
        },
        {
          "alias": "Switch",
          "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": "deviceIP",
          "preserveFormat": true,
          "thresholds": [],
          "type": "string",
          "unit": "short",
          "valueMaps": []
        },
        {
          "alias": "State",
          "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": "state",
          "preserveFormat": true,
          "thresholds": [],
          "type": "string",
          "unit": "short",
          "valueMaps": [
            {
              "text": "Up",
              "value": "0"
            },
            {
              "text": "Down",
              "value": "1"
            }
          ]
        },
        {
          "alias": "Port Down Reason",
          "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,
          "link": false,
          "mappingType": 1,
          "pattern": "portDownReason",
          "preserveFormat": true,
          "thresholds": [],
          "type": "string",
          "unit": "short"
        },
        {
          "alias": "Recommended Action",
          "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": "portDownDescription",
          "preserveFormat": true,
          "thresholds": [],
          "type": "string",
          "unit": "short"
        },
        {
          "alias": "CRC Error Count",
          "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": "crcErrorCount",
          "preserveFormat": true,
          "thresholds": [],
          "type": "number",
          "unit": "none"
        },
        {
          "alias": "Symbol Error Count",
          "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": "symbolErrorCount",
          "preserveFormat": true,
          "thresholds": [],
          "type": "number",
          "unit": "none"
        },
        {
          "alias": "State Change Count",
          "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": "stateChangeCount",
          "thresholds": [],
          "type": "number",
          "unit": "none"
        },
        {
          "alias": "In Port",
          "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": "ingressPort",
          "preserveFormat": true,
          "thresholds": [],
          "type": "string",
          "unit": "short"
        }
      ],
      "targets": [
        {
          "groupBy": [],
          "hide": false,
          "measurement": "prefixsocket_listener",
          "orderByTime": "ASC",
          "policy": "autogen",
          "query": "SELECT \"fromTimestamp\",\"toTimestamp\",\"deviceIP\",\"ingressPort\",\"state\",\"portDownReason\",\"portDownDescription\",\"crcErrorCount\",\"symbolErrorCount\",\"stateChangeCount\" FROM \"WJHAggregated\" WHERE \"deviceIP\"=~ /^$deviceIP$/ and \"ingressPort\"=~ /^$ingressPort$/ and \"portDownReason\"=~ /^$portDownReason$/ and ($timeFilter) LIMIT 500000",
          "rawQuery": true,
          "refId": "A",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "ethernet_etherType"
                ],
                "type": "field"
              }
            ],
            [
              {
                "params": [
                  "ethernet_pcp"
                ],
                "type": "field"
              }
            ],
            [
              {
                "params": [
                  "ethernet_vlanId"
                ],
                "type": "field"
              }
            ],
            [
              {
                "params": [
                  "ip_protocol"
                ],
                "type": "field"
              }
            ],
            [
              {
                "params": [
                  "ip_tos"
                ],
                "type": "field"
              }
            ],
            [
              {
                "params": [
                  "reason"
                ],
                "type": "field"
              }
            ],
            [
              {
                "params": [
                  "timestamp"
                ],
                "type": "field"
              }
            ],
            [
              {
                "params": [
                  "transport_dstPort"
                ],
                "type": "field"
              }
            ],
            [
              {
                "params": [
                  "transport_srcPort"
                ],
                "type": "field"
              }
            ],
            [
              {
                "params": [
                  "vxlan_innerDstPort"
                ],
                "type": "field"
              }
            ],
            [
              {
                "params": [
                  "vxlan_innerProtocol"
                ],
                "type": "field"
              }
            ],
            [
              {
                "params": [
                  "vxlan_innerSrcPort"
                ],
                "type": "field"
              }
            ],
            [
              {
                "params": [
                  "vxlan_vni"
                ],
                "type": "field"
              }
            ]
          ],
          "tags": []
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Layer 1 Issues log",
      "transform": "table",
      "type": "table"
    }
  ],
  "refresh": "1m",
  "schemaVersion": 18,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_TELEGRAF}",
        "definition": "SHOW TAG VALUES FROM WJHAggregated WITH KEY = deviceIP",
        "hide": 0,
        "includeAll": true,
        "label": "Switch IP",
        "multi": true,
        "name": "deviceIP",
        "options": [],
        "query": "SHOW TAG VALUES FROM WJHAggregated WITH KEY = deviceIP",
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 3,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_TELEGRAF}",
        "definition": "SHOW TAG VALUES FROM WJHAggregated WITH KEY = ingressPort",
        "hide": 0,
        "includeAll": true,
        "label": "In Port",
        "multi": true,
        "name": "ingressPort",
        "options": [],
        "query": "SHOW TAG VALUES FROM WJHAggregated WITH KEY = ingressPort",
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_TELEGRAF}",
        "definition": "SHOW TAG VALUES FROM WJHAggregated WITH KEY = portDownReason",
        "hide": 0,
        "includeAll": true,
        "label": "Port Down Reason",
        "multi": true,
        "name": "portDownReason",
        "options": [],
        "query": "SHOW TAG VALUES FROM WJHAggregated WITH KEY = portDownReason",
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-5m",
    "to": "now"
  },
  "timepicker": {
    "hidden": false,
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "10m",
      "15m",
      "30m",
      "1h"
    ],
    "time_options": [
      "5m",
      "15m",
      "1h",
      "6h",
      "12h",
      "24h",
      "2d",
      "7d",
      "30d"
    ]
  },
  "timezone": "browser",
  "title": "Mellanox - What Just Happened? Layer 1 Events",
  "uid": "3Qie9y1Wz",
  "version": 5,
  "description": "The Layer 1 dashboard provides real-time pane to view events and dropped packets caused by Layer 1 errors"
}