Grafana dashboard: FastNetMon destination ASN report
Description: FastNetMon destination ASN report


{
  "__inputs": [
    {
      "name": "DS_CLICKHOUSE",
      "label": "Clickhouse",
      "description": "",
      "type": "datasource",
      "pluginId": "vertamedia-clickhouse-datasource",
      "pluginName": "ClickHouse"
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "4.2.0"
    },
    {
      "type": "panel",
      "id": "grafana-piechart-panel",
      "name": "Pie Chart",
      "version": "1.1.4"
    },
    {
      "type": "datasource",
      "id": "vertamedia-clickhouse-datasource",
      "name": "ClickHouse",
      "version": "0.0.1"
    }
  ],
  "annotations": {
    "list": []
  },
  "editable": true,
  "gnetId": 2104,
  "graphTooltip": 0,
  "hideControls": false,
  "id": null,
  "links": [],
  "rows": [
    {
      "collapse": false,
      "height": "250px",
      "panels": [
        {
          "aliasColors": {},
          "cacheTimeout": null,
          "combine": {
            "label": "Others",
            "threshold": 0
          },
          "datasource": "${DS_CLICKHOUSE}",
          "fontSize": "80%",
          "format": "short",
          "id": 1,
          "interval": null,
          "legend": {
            "show": true,
            "sortDesc": true,
            "values": true
          },
          "legendType": "Under graph",
          "links": [],
          "maxDataPoints": 3,
          "nullPointMode": "connected",
          "pieType": "pie",
          "span": 12,
          "strokeWidth": 1,
          "targets": [
            {
              "database": "fastnetmon",
              "dateColDataType": "packetDate",
              "dateLoading": false,
              "dateTimeColDataType": "packetDateTime",
              "datetimeLoading": false,
              "formattedQuery": "<font color=\"darkcyan\">$columns</font>(<br />    dstAsn c,<br />    <font color=\"navajowhite\">sum</font>(<font color=\"navajowhite\">length</font>) <font color=\"navajowhite\">length</font>)<br /><font color=\"darkorange\">FROM</font> <font color=\"darkcyan\">$table</font><br /><font color=\"darkorange\">WHERE</font> dstAsn <font color=\"darkorange\">in</font> (<br />    <font color=\"darkorange\">SELECT</font> dstAsn<br />    <font color=\"darkorange\">FROM</font><br />(<br />        <font color=\"darkorange\">SELECT</font><br />            dstAsn,<br />            <font color=\"navajowhite\">sum</font>(<font color=\"navajowhite\">length</font>) <font color=\"darkorange\">as</font> <font color=\"navajowhite\">length</font><br />        <font color=\"darkorange\">FROM</font> <font color=\"darkcyan\">$table</font><br />        <font color=\"darkorange\">GROUP BY</font> dstAsn<br />        <font color=\"darkorange\">ORDER BY</font> <font color=\"navajowhite\">length</font> <font color=\"darkorange\">DESC</font><br />        <font color=\"darkorange\">LIMIT</font> <font color=\"cornflowerblue\">20</font><br />))",
              "intervalFactor": 1,
              "query": "$columns(\n    dstAsn c,\n    sum(length) length)\nFROM $table\nWHERE dstAsn in (\n    SELECT dstAsn\n    FROM\n(\n        SELECT\n            dstAsn,\n            sum(length) as length\n        FROM $table\n        GROUP BY dstAsn\n        ORDER BY length DESC\n        LIMIT 20\n))",
              "rawQuery": "SELECT t, groupArray((c, length)) as groupArr FROM ( SELECT (intDiv(toUInt32(packetDateTime), 21600) * 21600) * 1000 as t, dstAsn c, \n    sum(length) length FROM fastnetmon.traffic\nWHERE packetDate >= toDate(1491839204) AND packetDateTime >= toDateTime(1491839204) AND  dstAsn in (\n    SELECT dstAsn\n    FROM\n(\n        SELECT\n            dstAsn,\n            sum(length) as length\n        FROM fastnetmon.traffic\n        GROUP BY dstAsn\n        ORDER BY length DESC\n        LIMIT 20\n)) GROUP BY t, c  ORDER BY t, c) GROUP BY t ORDER BY t ",
              "refId": "A",
              "resultFormat": "time_series",
              "table": "traffic",
              "tableLoading": false,
              "tags": [],
              "targetLists": [
                [
                  {
                    "params": [
                      "*"
                    ],
                    "type": "field"
                  },
                  {
                    "params": [],
                    "type": "count"
                  }
                ]
              ]
            }
          ],
          "title": "Destination ASN report",
          "type": "grafana-piechart-panel",
          "valueName": "current"
        }
      ],
      "repeat": null,
      "repeatIteration": null,
      "repeatRowId": null,
      "showTitle": false,
      "title": "Dashboard Row",
      "titleSize": "h6"
    },
    {
      "collapse": false,
      "height": 250,
      "panels": [],
      "repeat": null,
      "repeatIteration": null,
      "repeatRowId": null,
      "showTitle": false,
      "title": "Dashboard Row",
      "titleSize": "h6"
    }
  ],
  "schemaVersion": 14,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": []
  },
  "time": {
    "from": "now-24h",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ],
    "time_options": [
      "5m",
      "15m",
      "1h",
      "6h",
      "12h",
      "24h",
      "2d",
      "7d",
      "30d"
    ]
  },
  "timezone": "browser",
  "title": "FastNetMon destination ASN report",
  "version": 3,
  "description": "FastNetMon destination ASN report"
}