Grafana dashboard: FastNetMon: Traffic for specified host
Description: Metrics of FastNetMon Advanced with ClickHouse DB.


{
  "__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.2"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": "5.0.0"
    },
    {
      "type": "panel",
      "id": "singlestat",
      "name": "Singlestat",
      "version": "5.0.0"
    },
    {
      "type": "datasource",
      "id": "vertamedia-clickhouse-datasource",
      "name": "ClickHouse",
      "version": "1.5.1"
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "gnetId": 7542,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1534240352288,
  "links": [],
  "panels": [
    {
      "cacheTimeout": null,
      "colorBackground": true,
      "colorValue": false,
      "colors": [
        "#d44a3a",
        "rgba(237, 129, 40, 0.89)",
        "#299c46"
      ],
      "datasource": "${DS_CLICKHOUSE}",
      "decimals": null,
      "format": "none",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": false
      },
      "gridPos": {
        "h": 2,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "hideTimeOverride": false,
      "id": 11,
      "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": " records for $host",
      "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(metricDateTime)",
      "targets": [
        {
          "database": "fastnetmon",
          "dateColDataType": "metricDate",
          "dateLoading": false,
          "dateTimeColDataType": "metricDateTime",
          "dateTimeType": "DATETIME",
          "datetimeLoading": false,
          "format": "table",
          "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t",
          "hide": false,
          "intervalFactor": 1,
          "query": "SELECT\n    count (metricDateTime)\nFROM $table\nWHERE ($timeFilter)\n      AND host = '$host'\n",
          "rawQuery": "SELECT     count (metricDateTime) FROM fastnetmon.host_metrics WHERE (metricDate >= toDate(1534236752) AND metricDateTime >= toDateTime(1534236752))       AND host = '127.0.0.1' ",
          "refId": "A",
          "round": "0s",
          "table": "host_metrics",
          "tableLoading": false
        }
      ],
      "thresholds": "1,10",
      "title": "",
      "type": "singlestat",
      "valueFontSize": "80%",
      "valueMaps": [
        {
          "op": "=",
          "text": "0",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_CLICKHOUSE}",
      "fill": 1,
      "gridPos": {
        "h": 9,
        "w": 12,
        "x": 0,
        "y": 2
      },
      "id": 2,
      "legend": {
        "alignAsTable": true,
        "avg": false,
        "current": true,
        "hideEmpty": true,
        "hideZero": true,
        "max": true,
        "min": true,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "minSpan": 9,
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "repeat": null,
      "repeatDirection": "h",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "database": "fastnetmon",
          "dateColDataType": "metricDate",
          "dateLoading": false,
          "dateTimeColDataType": "metricDateTime",
          "dateTimeType": "DATETIME",
          "datetimeLoading": false,
          "format": "time_series",
          "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t",
          "hide": false,
          "interval": "",
          "intervalFactor": 1,
          "query": "SELECT\n    $timeSeries as t, bits_incoming\nFROM $table\nWHERE $timeFilter AND host='$host'\nORDER BY t\n",
          "rawQuery": "SELECT     (intDiv(toUInt32(metricDateTime), 5) * 5) * 1000 as t, bits_incoming FROM fastnetmon.host_metrics WHERE metricDate >= toDate(1534236752) AND metricDateTime >= toDateTime(1534236752) AND host='127.0.0.1' ORDER BY t ",
          "refId": "A",
          "round": "0s",
          "table": "host_metrics",
          "tableLoading": false
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeShift": null,
      "title": "Incomming traffic",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "transparent": true,
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "bps",
          "label": "",
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": "",
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {
        "bits_outgoing": "#64b0c8"
      },
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_CLICKHOUSE}",
      "fill": 1,
      "gridPos": {
        "h": 9,
        "w": 12,
        "x": 12,
        "y": 2
      },
      "id": 7,
      "legend": {
        "alignAsTable": true,
        "avg": false,
        "current": true,
        "hideEmpty": true,
        "hideZero": true,
        "max": true,
        "min": true,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "minSpan": 9,
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "repeatDirection": "h",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "database": "fastnetmon",
          "dateColDataType": "metricDate",
          "dateLoading": false,
          "dateTimeColDataType": "metricDateTime",
          "dateTimeType": "DATETIME",
          "datetimeLoading": false,
          "format": "time_series",
          "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t",
          "hide": false,
          "interval": "",
          "intervalFactor": 1,
          "query": "SELECT\n    $timeSeries as t, bits_outgoing\nFROM $table\nWHERE $timeFilter AND host='$host'\nORDER BY t\n",
          "rawQuery": "SELECT     (intDiv(toUInt32(metricDateTime), 5) * 5) * 1000 as t, bits_outgoing FROM fastnetmon.host_metrics WHERE metricDate >= toDate(1534236752) AND metricDateTime >= toDateTime(1534236752) AND host='127.0.0.1' ORDER BY t ",
          "refId": "A",
          "round": "0s",
          "table": "host_metrics",
          "tableLoading": false
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeShift": null,
      "title": "Outgoing traffic",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "transparent": true,
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "bps",
          "label": "",
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": "",
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_CLICKHOUSE}",
      "fill": 1,
      "gridPos": {
        "h": 9,
        "w": 12,
        "x": 0,
        "y": 11
      },
      "id": 5,
      "legend": {
        "alignAsTable": true,
        "avg": false,
        "current": true,
        "hideEmpty": true,
        "hideZero": true,
        "max": true,
        "min": true,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "minSpan": 9,
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "repeatDirection": "h",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "database": "fastnetmon",
          "dateColDataType": "metricDate",
          "dateLoading": false,
          "dateTimeColDataType": "metricDateTime",
          "dateTimeType": "DATETIME",
          "datetimeLoading": false,
          "format": "time_series",
          "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t",
          "hide": false,
          "interval": "",
          "intervalFactor": 1,
          "query": "SELECT\n    $timeSeries as t, packets_incoming\nFROM $table\nWHERE $timeFilter AND host='$host'\nORDER BY t\n",
          "rawQuery": "SELECT     (intDiv(toUInt32(metricDateTime), 5) * 5) * 1000 as t, packets_incoming FROM fastnetmon.host_metrics WHERE metricDate >= toDate(1534236752) AND metricDateTime >= toDateTime(1534236752) AND host='127.0.0.1' ORDER BY t ",
          "refId": "A",
          "round": "0s",
          "table": "host_metrics",
          "tableLoading": false
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeShift": null,
      "title": "Incomming packets",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "transparent": true,
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "pps",
          "label": "",
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": "",
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {
        "packets_outgoing": "#64b0c8"
      },
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_CLICKHOUSE}",
      "fill": 1,
      "gridPos": {
        "h": 9,
        "w": 12,
        "x": 12,
        "y": 11
      },
      "id": 8,
      "legend": {
        "alignAsTable": true,
        "avg": false,
        "current": true,
        "hideEmpty": true,
        "hideZero": true,
        "max": true,
        "min": true,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "minSpan": 9,
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "repeatDirection": "h",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "database": "fastnetmon",
          "dateColDataType": "metricDate",
          "dateLoading": false,
          "dateTimeColDataType": "metricDateTime",
          "dateTimeType": "DATETIME",
          "datetimeLoading": false,
          "format": "time_series",
          "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t",
          "hide": false,
          "interval": "",
          "intervalFactor": 1,
          "query": "SELECT\n    $timeSeries as t, packets_outgoing\nFROM $table\nWHERE $timeFilter AND host='$host'\nORDER BY t\n",
          "rawQuery": "SELECT     (intDiv(toUInt32(metricDateTime), 5) * 5) * 1000 as t, packets_outgoing FROM fastnetmon.host_metrics WHERE metricDate >= toDate(1534236752) AND metricDateTime >= toDateTime(1534236752) AND host='127.0.0.1' ORDER BY t ",
          "refId": "A",
          "round": "0s",
          "table": "host_metrics",
          "tableLoading": false
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeShift": null,
      "title": "Outgoing packets",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "transparent": true,
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "pps",
          "label": "",
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": "",
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_CLICKHOUSE}",
      "fill": 1,
      "gridPos": {
        "h": 9,
        "w": 12,
        "x": 0,
        "y": 20
      },
      "id": 6,
      "legend": {
        "alignAsTable": true,
        "avg": false,
        "current": true,
        "hideEmpty": true,
        "hideZero": true,
        "max": true,
        "min": true,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "minSpan": 9,
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "repeatDirection": "h",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "database": "fastnetmon",
          "dateColDataType": "metricDate",
          "dateLoading": false,
          "dateTimeColDataType": "metricDateTime",
          "dateTimeType": "DATETIME",
          "datetimeLoading": false,
          "format": "time_series",
          "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t",
          "hide": false,
          "interval": "",
          "intervalFactor": 1,
          "query": "SELECT\n    $timeSeries as t, flows_incoming\nFROM $table\nWHERE $timeFilter AND host='$host'\nORDER BY t\n",
          "rawQuery": "SELECT     (intDiv(toUInt32(metricDateTime), 5) * 5) * 1000 as t, flows_incoming FROM fastnetmon.host_metrics WHERE metricDate >= toDate(1534236752) AND metricDateTime >= toDateTime(1534236752) AND host='127.0.0.1' ORDER BY t ",
          "refId": "A",
          "round": "0s",
          "table": "host_metrics",
          "tableLoading": false
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeShift": null,
      "title": "Incomming flows",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "transparent": true,
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "pps",
          "label": "",
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": "",
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_CLICKHOUSE}",
      "fill": 1,
      "gridPos": {
        "h": 9,
        "w": 12,
        "x": 12,
        "y": 20
      },
      "id": 9,
      "legend": {
        "alignAsTable": true,
        "avg": false,
        "current": true,
        "hideEmpty": true,
        "hideZero": true,
        "max": true,
        "min": true,
        "show": true,
        "sort": "min",
        "sortDesc": false,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "minSpan": 9,
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "repeatDirection": "h",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "database": "fastnetmon",
          "dateColDataType": "metricDate",
          "dateLoading": false,
          "dateTimeColDataType": "metricDateTime",
          "dateTimeType": "DATETIME",
          "datetimeLoading": false,
          "format": "time_series",
          "formattedQuery": "SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t",
          "hide": false,
          "interval": "",
          "intervalFactor": 1,
          "query": "SELECT\n    $timeSeries as t, flows_outgoing\nFROM $table\nWHERE $timeFilter AND host='$host'\nORDER BY t\n",
          "rawQuery": "SELECT     (intDiv(toUInt32(metricDateTime), 5) * 5) * 1000 as t, flows_outgoing FROM fastnetmon.host_metrics WHERE metricDate >= toDate(1534236752) AND metricDateTime >= toDateTime(1534236752) AND host='127.0.0.1' ORDER BY t ",
          "refId": "A",
          "round": "0s",
          "table": "host_metrics",
          "tableLoading": false
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeShift": null,
      "title": "Outgoing flows",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "transparent": true,
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "pps",
          "label": "",
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "short",
          "label": "",
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    }
  ],
  "refresh": "1m",
  "schemaVersion": 16,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "allValue": null,
        "current": {
          "tags": [],
          "text": "127.0.0.1",
          "value": "127.0.0.1"
        },
        "hide": 0,
        "includeAll": false,
        "label": "Host's IP address",
        "multi": false,
        "name": "host",
        "options": [
          {
            "selected": true,
            "text": "127.0.0.1",
            "value": "127.0.0.1"
          }
        ],
        "query": "127.0.0.1",
        "type": "custom"
      }
    ]
  },
  "time": {
    "from": "now-1h",
    "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: Traffic for specified host",
  "uid": "tp46I8cmz",
  "version": 18,
  "description": "Metrics of FastNetMon Advanced with ClickHouse DB."
}