Grafana dashboard: FastNetMon Advanced TOP 10 Hosts v2
Description: FastNetMon Advanced TOP 10 Hosts v2

This dashboard shows top 10 talkers in tour network according to data from Clickhouse 

{
  "__inputs": [
    {
      "name": "DS_CLICKHOUSE",
      "label": "Clickhouse",
      "description": "",
      "type": "datasource",
      "pluginId": "vertamedia-clickhouse-datasource",
      "pluginName": "ClickHouse"
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "5.2.4"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": "5.0.0"
    },
    {
      "type": "datasource",
      "id": "vertamedia-clickhouse-datasource",
      "name": "ClickHouse",
      "version": "1.7.0"
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "description": "FastNetMon Advanced TOP 10 Hosts v2",
  "editable": true,
  "gnetId": 8574,
  "graphTooltip": 0,
  "id": null,
  "links": [],
  "panels": [
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_CLICKHOUSE}",
      "fill": 1,
      "gridPos": {
        "h": 6,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 1,
      "legend": {
        "alignAsTable": true,
        "avg": false,
        "current": true,
        "max": false,
        "min": false,
        "rightSide": true,
        "show": true,
        "sideWidth": 200,
        "sort": "current",
        "sortDesc": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "database": "fastnetmon",
          "dateColDataType": "metricDate",
          "dateLoading": false,
          "dateTimeColDataType": "metricDateTime",
          "dateTimeType": "DATETIME",
          "datetimeLoading": false,
          "dsType": "influxdb",
          "format": "time_series",
          "formattedQuery": "<font color=\"darkcyan\">$columns</font>(<br />    host c,<br />    <font color=\"navajowhite\">sum</font>(bits_incoming) <font color=\"navajowhite\">length</font>)<br /><font color=\"darkorange\">FROM</font> <font color=\"darkcyan\">$table</font><br /><font color=\"darkorange\">WHERE</font> host <font color=\"darkorange\">in</font> (<br />    <font color=\"darkorange\">SELECT</font> host<br />    <font color=\"darkorange\">FROM</font><br />(<br />        <font color=\"darkorange\">SELECT</font><br />            host,<br />            <font color=\"navajowhite\">sum</font>(bits_incoming) <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> host<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\">10</font><br />))",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "interval": "1s",
          "intervalFactor": 1,
          "orderByTime": "ASC",
          "policy": "default",
          "query": "$columns(\n    host c,\n    sum(bits_incoming) length)\nFROM $table\nWHERE host in (\n    SELECT host\n    FROM\n(\n        SELECT\n            host,\n            sum(bits_incoming) as length\n        FROM $table\n        WHERE $timeFilter \n        GROUP BY host\n        ORDER BY length DESC\n        LIMIT 7\n))",
          "rawQuery": "SELECT t, groupArray((c, length)) as groupArr FROM ( SELECT (intDiv(toUInt32(metricDateTime), 1) * 1) * 1000 as t, host c, sum(bits_incoming) length FROM fastnetmon.host_metrics WHERE metricDate >= toDate(1540412766) AND metricDateTime >= toDateTime(1540412766) AND  host in (     SELECT host     FROM (         SELECT             host,             sum(bits_incoming) as length         FROM fastnetmon.host_metrics         WHERE metricDate >= toDate(1540412766) AND metricDateTime >= toDateTime(1540412766)          GROUP BY host         ORDER BY length DESC         LIMIT 7 )) GROUP BY t, c  ORDER BY t, c) GROUP BY t ORDER BY t",
          "refId": "A",
          "resultFormat": "time_series",
          "round": "0s",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "table": "host_metrics",
          "tableLoading": false,
          "tags": []
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeShift": null,
      "title": "Incoming traffic",
      "tooltip": {
        "shared": false,
        "sort": 0,
        "value_type": "individual"
      },
      "transparent": true,
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": false,
        "values": []
      },
      "yaxes": [
        {
          "format": "bps",
          "label": "MBPS IN",
          "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_CLICKHOUSE}",
      "fill": 1,
      "gridPos": {
        "h": 6,
        "w": 24,
        "x": 0,
        "y": 6
      },
      "id": 3,
      "legend": {
        "alignAsTable": true,
        "avg": false,
        "current": true,
        "max": false,
        "min": false,
        "rightSide": true,
        "show": true,
        "sideWidth": 185,
        "sort": "current",
        "sortDesc": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "alias": "/./",
          "transform": "negative-Y"
        }
      ],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "database": "fastnetmon",
          "dateColDataType": "metricDate",
          "dateLoading": false,
          "dateTimeColDataType": "metricDateTime",
          "dateTimeType": "DATETIME",
          "datetimeLoading": false,
          "dsType": "influxdb",
          "format": "time_series",
          "formattedQuery": "<font color=\"darkcyan\">$columns</font>(<br />    host c,<br />    <font color=\"navajowhite\">sum</font>(bits_incoming) <font color=\"navajowhite\">length</font>)<br /><font color=\"darkorange\">FROM</font> <font color=\"darkcyan\">$table</font><br /><font color=\"darkorange\">WHERE</font> host <font color=\"darkorange\">in</font> (<br />    <font color=\"darkorange\">SELECT</font> host<br />    <font color=\"darkorange\">FROM</font><br />(<br />        <font color=\"darkorange\">SELECT</font><br />            host,<br />            <font color=\"navajowhite\">sum</font>(bits_incoming) <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> host<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\">10</font><br />))",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "interval": "1s",
          "intervalFactor": 1,
          "orderByTime": "ASC",
          "policy": "default",
          "query": "$columns(\n    host c,\n    sum(bits_outgoing) length)\nFROM $table\nWHERE host in (\n    SELECT host\n    FROM\n(\n        SELECT\n            host,\n            sum(bits_outgoing) as length\n        FROM $table\n        WHERE $timeFilter \n        GROUP BY host\n        ORDER BY length DESC\n        LIMIT 7\n))",
          "rawQuery": "SELECT t, groupArray((c, length)) as groupArr FROM ( SELECT (intDiv(toUInt32(metricDateTime), 1) * 1) * 1000 as t, host c, sum(bits_outgoing) length FROM fastnetmon.host_metrics WHERE metricDate >= toDate(1540412766) AND metricDateTime >= toDateTime(1540412766) AND  host in (     SELECT host     FROM (         SELECT             host,             sum(bits_outgoing) as length         FROM fastnetmon.host_metrics         WHERE metricDate >= toDate(1540412766) AND metricDateTime >= toDateTime(1540412766)          GROUP BY host         ORDER BY length DESC         LIMIT 7 )) GROUP BY t, c  ORDER BY t, c) GROUP BY t ORDER BY t",
          "refId": "A",
          "resultFormat": "time_series",
          "round": "0s",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "table": "host_metrics",
          "tableLoading": false,
          "tags": []
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeShift": null,
      "title": "Outgoing traffic",
      "tooltip": {
        "shared": false,
        "sort": 0,
        "value_type": "individual"
      },
      "transparent": true,
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "bps",
          "label": "MBPS OUT",
          "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_CLICKHOUSE}",
      "fill": 1,
      "gridPos": {
        "h": 6,
        "w": 24,
        "x": 0,
        "y": 12
      },
      "id": 2,
      "legend": {
        "alignAsTable": true,
        "avg": false,
        "current": true,
        "max": false,
        "min": false,
        "rightSide": true,
        "show": true,
        "sideWidth": 200,
        "sort": "current",
        "sortDesc": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "database": "fastnetmon",
          "dateColDataType": "metricDate",
          "dateLoading": false,
          "dateTimeColDataType": "metricDateTime",
          "dateTimeType": "DATETIME",
          "datetimeLoading": false,
          "dsType": "influxdb",
          "format": "time_series",
          "formattedQuery": "<font color=\"darkcyan\">$columns</font>(<br />    host c,<br />    <font color=\"navajowhite\">sum</font>(packets_incoming) <font color=\"navajowhite\">length</font>)<br /><font color=\"darkorange\">FROM</font> <font color=\"darkcyan\">$table</font><br /><font color=\"darkorange\">WHERE</font> host <font color=\"darkorange\">in</font> (<br />    <font color=\"darkorange\">SELECT</font> host<br />    <font color=\"darkorange\">FROM</font><br />(<br />        <font color=\"darkorange\">SELECT</font><br />            host,<br />            <font color=\"navajowhite\">sum</font>(packets_incoming) <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> host<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\">10</font><br />))",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "interval": "1s",
          "intervalFactor": 1,
          "orderByTime": "ASC",
          "policy": "default",
          "query": "$columns(\n    host c,\n    sum(packets_incoming) length)\nFROM $table\nWHERE host in (\n    SELECT host\n    FROM\n(\n        SELECT\n            host,\n            sum(packets_incoming) as length\n        FROM $table\n        WHERE $timeFilter \n        GROUP BY host\n        ORDER BY length DESC\n        LIMIT 7\n))",
          "rawQuery": "SELECT t, groupArray((c, length)) as groupArr FROM ( SELECT (intDiv(toUInt32(metricDateTime), 1) * 1) * 1000 as t, host c, sum(packets_incoming) length FROM fastnetmon.host_metrics WHERE metricDate >= toDate(1540412766) AND metricDateTime >= toDateTime(1540412766) AND  host in (     SELECT host     FROM (         SELECT             host,             sum(packets_incoming) as length         FROM fastnetmon.host_metrics         WHERE metricDate >= toDate(1540412766) AND metricDateTime >= toDateTime(1540412766)          GROUP BY host         ORDER BY length DESC         LIMIT 7 )) GROUP BY t, c  ORDER BY t, c) GROUP BY t ORDER BY t",
          "refId": "A",
          "resultFormat": "time_series",
          "round": "0s",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "table": "host_metrics",
          "tableLoading": false,
          "tags": []
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeShift": null,
      "title": "Packets incoming",
      "tooltip": {
        "shared": false,
        "sort": 0,
        "value_type": "individual"
      },
      "transparent": true,
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": false,
        "values": []
      },
      "yaxes": [
        {
          "format": "pps",
          "label": "PPS IN",
          "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_CLICKHOUSE}",
      "fill": 1,
      "gridPos": {
        "h": 6,
        "w": 24,
        "x": 0,
        "y": 18
      },
      "id": 4,
      "legend": {
        "alignAsTable": true,
        "avg": false,
        "current": true,
        "max": false,
        "min": false,
        "rightSide": true,
        "show": true,
        "sideWidth": 185,
        "sort": "current",
        "sortDesc": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [
        {
          "alias": "/./",
          "transform": "negative-Y"
        }
      ],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "database": "fastnetmon",
          "dateColDataType": "metricDate",
          "dateLoading": false,
          "dateTimeColDataType": "metricDateTime",
          "dateTimeType": "DATETIME",
          "datetimeLoading": false,
          "dsType": "influxdb",
          "format": "time_series",
          "formattedQuery": "<font color=\"darkcyan\">$columns</font>(<br />    host c,<br />    <font color=\"navajowhite\">sum</font>(packets_incoming) <font color=\"navajowhite\">length</font>)<br /><font color=\"darkorange\">FROM</font> <font color=\"darkcyan\">$table</font><br /><font color=\"darkorange\">WHERE</font> host <font color=\"darkorange\">in</font> (<br />    <font color=\"darkorange\">SELECT</font> host<br />    <font color=\"darkorange\">FROM</font><br />(<br />        <font color=\"darkorange\">SELECT</font><br />            host,<br />            <font color=\"navajowhite\">sum</font>(packets_incoming) <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> host<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\">10</font><br />))",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "interval": "1s",
          "intervalFactor": 1,
          "orderByTime": "ASC",
          "policy": "default",
          "query": "$columns(\n    host c,\n    sum(packets_outgoing) length)\nFROM $table\nWHERE host in (\n    SELECT host\n    FROM\n(\n        SELECT\n            host,\n            sum(packets_outgoing) as length\n        FROM $table\n        WHERE $timeFilter \n        GROUP BY host\n        ORDER BY length DESC\n        LIMIT 7))",
          "rawQuery": "SELECT t, groupArray((c, length)) as groupArr FROM ( SELECT (intDiv(toUInt32(metricDateTime), 1) * 1) * 1000 as t, host c, sum(packets_outgoing) length FROM fastnetmon.host_metrics WHERE metricDate >= toDate(1540412766) AND metricDateTime >= toDateTime(1540412766) AND  host in (     SELECT host     FROM (         SELECT             host,             sum(packets_outgoing) as length         FROM fastnetmon.host_metrics         WHERE metricDate >= toDate(1540412766) AND metricDateTime >= toDateTime(1540412766)          GROUP BY host         ORDER BY length DESC         LIMIT 7)) GROUP BY t, c  ORDER BY t, c) GROUP BY t ORDER BY t",
          "refId": "A",
          "resultFormat": "time_series",
          "round": "0s",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "table": "host_metrics",
          "tableLoading": false,
          "tags": []
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeShift": null,
      "title": "Packets outgoing",
      "tooltip": {
        "shared": false,
        "sort": 0,
        "value_type": "individual"
      },
      "transparent": true,
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "pps",
          "label": "PPS OUT",
          "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
      }
    }
  ],
  "refresh": "30s",
  "schemaVersion": 16,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": []
  },
  "time": {
    "from": "now-5m",
    "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": "FastNetMon Advanced TOP 10 Hosts v2",
  "uid": "3VNbfPxmzz",
  "version": 2
}