FastNetMon Advanced top 10 hosts per network
FastNetMon Advanced TOP 10 Hosts per network
FastNetMon Advanced TOP 10 Hosts per network
FastNetMon Advanced TOP 10 Hosts per network
{
  "__inputs": [
    {
      "name": "DS_CLICKHOUSE",
      "label": "Clickhouse",
      "description": "",
      "type": "datasource",
      "pluginId": "vertamedia-clickhouse-datasource",
      "pluginName": "ClickHouse"
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "7.5.3"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "vertamedia-clickhouse-datasource",
      "name": "ClickHouse",
      "version": "2.0.1"
    }
  ],
  "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 per network",
  "editable": true,
  "gnetId": 15969,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1648081060358,
  "links": [],
  "panels": [
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_CLICKHOUSE}",
      "fieldConfig": {
        "defaults": {},
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 6,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "hiddenSeries": false,
      "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",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "7.5.3",
      "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",
          "extrapolate": true,
          "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 and isIPAddressInRange(host, '$Network')\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(1648080103) AND metricDateTime >= toDateTime(1648080103) AND host in (     SELECT host     FROM (         SELECT             host,             sum(bits_incoming) as length         FROM fastnetmon.host_metrics         WHERE metricDate >= toDate(1648080103) AND metricDateTime >= toDateTime(1648080103) and isIPAddressInRange(host, '103.100.92.0/24')         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,
      "timeRegions": [],
      "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}",
      "fieldConfig": {
        "defaults": {},
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 6,
        "w": 24,
        "x": 0,
        "y": 6
      },
      "hiddenSeries": false,
      "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",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "7.5.3",
      "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",
          "extrapolate": true,
          "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 and isIPAddressInRange(host, '$Network')\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(1648080109) AND metricDateTime >= toDateTime(1648080109) AND host in (     SELECT host     FROM (         SELECT             host,             sum(bits_outgoing) as length         FROM fastnetmon.host_metrics         WHERE metricDate >= toDate(1648080109) AND metricDateTime >= toDateTime(1648080109) and isIPAddressInRange(host, '103.100.92.0/24')         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,
      "timeRegions": [],
      "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}",
      "fieldConfig": {
        "defaults": {},
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 6,
        "w": 24,
        "x": 0,
        "y": 12
      },
      "hiddenSeries": false,
      "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",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "7.5.3",
      "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",
          "extrapolate": true,
          "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  and isIPAddressInRange(host, '$Network')\n        GROUP BY host\n        ORDER BY length DESC\n        LIMIT 25\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 BETWEEN toDate(1647820799) AND toDate(1647993600) AND metricDateTime BETWEEN toDateTime(1647820799) AND toDateTime(1647993600) AND host in (     SELECT host     FROM (         SELECT             host,             sum(packets_incoming) as length         FROM fastnetmon.host_metrics         WHERE metricDate BETWEEN toDate(1647820799) AND toDate(1647993600) AND metricDateTime BETWEEN toDateTime(1647820799) AND toDateTime(1647993600)  and isIPAddressInRange(host, '203.190.12.0/24')         GROUP BY host         ORDER BY length DESC         LIMIT 25 )) 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,
      "timeRegions": [],
      "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}",
      "fieldConfig": {
        "defaults": {},
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 6,
        "w": 24,
        "x": 0,
        "y": 18
      },
      "hiddenSeries": false,
      "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",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "7.5.3",
      "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",
          "extrapolate": true,
          "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 and isIPAddressInRange(host, '$Network')\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(1648080122) AND metricDateTime >= toDateTime(1648080122) AND host in (     SELECT host     FROM (         SELECT             host,             sum(packets_outgoing) as length         FROM fastnetmon.host_metrics         WHERE metricDate >= toDate(1648080122) AND metricDateTime >= toDateTime(1648080122) and isIPAddressInRange(host, '103.100.92.0/24')         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,
      "timeRegions": [],
      "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": false,
  "schemaVersion": 27,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {},
        "datasource": "${DS_CLICKHOUSE}",
        "definition": "select distinct replaceAll(IPv4NumToStringClassC(IPv4StringToNum(host)),'xxx', '0/24') from fastnetmon.host_metrics  where metricDate = today() order by host",
        "description": "Network",
        "error": null,
        "hide": 0,
        "includeAll": false,
        "label": "Network",
        "multi": false,
        "name": "Network",
        "options": [],
        "query": "select distinct replaceAll(IPv4NumToStringClassC(IPv4StringToNum(host)),'xxx', '0/24') from fastnetmon.host_metrics  where metricDate = today() order by host",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "2022-03-21T02:08:05.747Z",
    "to": "2022-03-21T02:23:27.508Z"
  },
  "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 per network",
  "uid": "gFt_deEnk",
  "version": 4
}