Grafana dashboard: Fastnetmon Advanced ClickHouse
Description: Fastnetmon ADVANCED metrics with ClickHouse backend

Fastnetmon ADVANCED metics with ClickHouse backend

{
  "__inputs": [
    {
      "name": "DS_CLICKHOUSE",
      "label": "clickhouse",
      "description": "",
      "type": "datasource",
      "pluginId": "vertamedia-clickhouse-datasource",
      "pluginName": "ClickHouse"
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "4.4.3"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": ""
    },
    {
      "type": "panel",
      "id": "singlestat",
      "name": "Singlestat",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "vertamedia-clickhouse-datasource",
      "name": "ClickHouse",
      "version": "0.0.2"
    }
  ],
  "annotations": {
    "list": []
  },
  "editable": false,
  "gnetId": 3413,
  "graphTooltip": 0,
  "hideControls": true,
  "id": null,
  "links": [],
  "refresh": "10s",
  "rows": [
    {
      "collapse": false,
      "height": 295,
      "panels": [
        {
          "cacheTimeout": null,
          "colorBackground": false,
          "colorValue": true,
          "colors": [
            "rgba(50, 172, 45, 0.97)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(245, 54, 54, 0.9)"
          ],
          "datasource": "${DS_CLICKHOUSE}",
          "format": "bps",
          "gauge": {
            "maxValue": 15000000000,
            "minValue": 0,
            "show": true,
            "thresholdLabels": false,
            "thresholdMarkers": true
          },
          "id": 5,
          "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": "50%",
          "prefix": "",
          "prefixFontSize": "50%",
          "rangeMaps": [
            {
              "from": "null",
              "text": "N/A",
              "to": "null"
            }
          ],
          "span": 5,
          "sparkline": {
            "fillColor": "rgba(31, 118, 189, 0.18)",
            "full": false,
            "lineColor": "rgb(31, 120, 193)",
            "show": false
          },
          "tableColumn": "",
          "targets": [
            {
              "database": "fastnetmon",
              "dateColDataType": "metricDate",
              "dateLoading": false,
              "dateTimeColDataType": "metricDateTime",
              "datetimeLoading": false,
              "dsType": "influxdb",
              "formattedQuery": "<font color=\"darkorange\">SELECT</font><br />    <font color=\"darkcyan\">$timeSeries</font> <font color=\"darkorange\">as</font> i,<br />    <font color=\"navajowhite\">sum</font>(bits)<br /><font color=\"darkorange\">FROM</font> <font color=\"darkcyan\">$table</font><br /><font color=\"darkorange\">WHERE</font><br />    <font color=\"darkcyan\">$timeFilter</font><br />    <font color=\"yellow\">and</font> direction <font color=\"yellow\">=</font> <font color=\"lightgreen\">'incoming'</font><br /><font color=\"darkorange\">GROUP BY</font> i<br /><font color=\"darkorange\">ORDER BY</font> i",
              "groupBy": [
                {
                  "params": [
                    "$__interval"
                  ],
                  "type": "time"
                },
                {
                  "params": [
                    "null"
                  ],
                  "type": "fill"
                }
              ],
              "interval": "1s",
              "intervalFactor": 1,
              "orderByTime": "ASC",
              "policy": "default",
              "query": "SELECT\n    $timeSeries as i,\n    sum(bits)\nFROM $table\nWHERE\n    $timeFilter\n    and direction = 'incoming'\nGROUP BY i\nORDER BY i",
              "rawQuery": "SELECT     (intDiv(toUInt32(metricDateTime), 1) * 1) * 1000 as i,     sum(bits) FROM fastnetmon.total_metrics WHERE     metricDate >= toDate(1507664716) AND metricDateTime >= toDateTime(1507664716)     and direction = 'incoming' GROUP BY i ORDER BY i",
              "refId": "A",
              "resultFormat": "time_series",
              "round": "0s",
              "select": [
                [
                  {
                    "params": [
                      "value"
                    ],
                    "type": "field"
                  },
                  {
                    "params": [],
                    "type": "mean"
                  }
                ]
              ],
              "table": "total_metrics",
              "tableLoading": false,
              "tags": []
            }
          ],
          "thresholds": "12000000000,14000000000",
          "title": "MBPS IN",
          "type": "singlestat",
          "valueFontSize": "50%",
          "valueMaps": [
            {
              "op": "=",
              "text": "N/A",
              "value": "null"
            }
          ],
          "valueName": "current"
        },
        {
          "cacheTimeout": null,
          "colorBackground": false,
          "colorValue": true,
          "colors": [
            "rgba(50, 172, 45, 0.97)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(245, 54, 54, 0.9)"
          ],
          "datasource": "${DS_CLICKHOUSE}",
          "format": "pps",
          "gauge": {
            "maxValue": 100,
            "minValue": 0,
            "show": false,
            "thresholdLabels": false,
            "thresholdMarkers": true
          },
          "id": 6,
          "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": "50%",
          "prefix": "",
          "prefixFontSize": "50%",
          "rangeMaps": [
            {
              "from": "null",
              "text": "N/A",
              "to": "null"
            }
          ],
          "span": 1,
          "sparkline": {
            "fillColor": "rgba(31, 118, 189, 0.18)",
            "full": false,
            "lineColor": "rgb(31, 120, 193)",
            "show": false
          },
          "tableColumn": "",
          "targets": [
            {
              "database": "fastnetmon",
              "dateColDataType": "metricDate",
              "dateLoading": false,
              "dateTimeColDataType": "metricDateTime",
              "datetimeLoading": false,
              "dsType": "influxdb",
              "formattedQuery": "<font color=\"darkorange\">SELECT</font><br />    <font color=\"darkcyan\">$timeSeries</font> <font color=\"darkorange\">as</font> i,<br />    <font color=\"navajowhite\">sum</font>(packets)<br /><font color=\"darkorange\">FROM</font> <font color=\"darkcyan\">$table</font><br /><font color=\"darkorange\">WHERE</font><br />    <font color=\"darkcyan\">$timeFilter</font><br />    <font color=\"yellow\">and</font> direction <font color=\"yellow\">=</font> <font color=\"lightgreen\">'incoming'</font><br /><font color=\"darkorange\">GROUP BY</font> i<br /><font color=\"darkorange\">ORDER BY</font> i",
              "groupBy": [
                {
                  "params": [
                    "$__interval"
                  ],
                  "type": "time"
                },
                {
                  "params": [
                    "null"
                  ],
                  "type": "fill"
                }
              ],
              "interval": "1s",
              "intervalFactor": 1,
              "orderByTime": "ASC",
              "policy": "default",
              "query": "SELECT\n    $timeSeries as i,\n    sum(packets)\nFROM $table\nWHERE\n    $timeFilter\n    and direction = 'incoming'\nGROUP BY i\nORDER BY i",
              "rawQuery": "SELECT     (intDiv(toUInt32(metricDateTime), 1) * 1) * 1000 as i,     sum(packets) FROM fastnetmon.total_metrics WHERE     metricDate >= toDate(1507664716) AND metricDateTime >= toDateTime(1507664716)     and direction = 'incoming' GROUP BY i ORDER BY i",
              "refId": "A",
              "resultFormat": "time_series",
              "round": "0s",
              "select": [
                [
                  {
                    "params": [
                      "value"
                    ],
                    "type": "field"
                  },
                  {
                    "params": [],
                    "type": "mean"
                  }
                ]
              ],
              "table": "total_metrics",
              "tableLoading": false,
              "tags": []
            }
          ],
          "thresholds": "1800000,2000000",
          "title": "PPS IN",
          "type": "singlestat",
          "valueFontSize": "50%",
          "valueMaps": [
            {
              "op": "=",
              "text": "N/A",
              "value": "null"
            }
          ],
          "valueName": "avg"
        },
        {
          "cacheTimeout": null,
          "colorBackground": false,
          "colorValue": true,
          "colors": [
            "rgba(50, 172, 45, 0.97)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(245, 54, 54, 0.9)"
          ],
          "datasource": "${DS_CLICKHOUSE}",
          "format": "pps",
          "gauge": {
            "maxValue": 100,
            "minValue": 0,
            "show": false,
            "thresholdLabels": false,
            "thresholdMarkers": true
          },
          "id": 8,
          "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": "50%",
          "prefix": "",
          "prefixFontSize": "50%",
          "rangeMaps": [
            {
              "from": "null",
              "text": "N/A",
              "to": "null"
            }
          ],
          "span": 1,
          "sparkline": {
            "fillColor": "rgba(31, 118, 189, 0.18)",
            "full": false,
            "lineColor": "rgb(31, 120, 193)",
            "show": false
          },
          "tableColumn": "",
          "targets": [
            {
              "database": "fastnetmon",
              "dateColDataType": "metricDate",
              "dateLoading": false,
              "dateTimeColDataType": "metricDateTime",
              "datetimeLoading": false,
              "formattedQuery": "<font color=\"darkorange\">SELECT</font><br />    <font color=\"darkcyan\">$timeSeries</font> <font color=\"darkorange\">as</font> i,<br />    <font color=\"navajowhite\">sum</font>(packets)<br /><font color=\"darkorange\">FROM</font> <font color=\"darkcyan\">$table</font><br /><font color=\"darkorange\">WHERE</font><br />    <font color=\"darkcyan\">$timeFilter</font><br />    <font color=\"yellow\">and</font> direction <font color=\"yellow\">=</font> <font color=\"lightgreen\">'outgoing'</font><br /><font color=\"darkorange\">GROUP BY</font> i<br /><font color=\"darkorange\">ORDER BY</font> i",
              "interval": "1s",
              "intervalFactor": 1,
              "query": "SELECT\n    $timeSeries as i,\n    sum(packets)\nFROM $table\nWHERE\n    $timeFilter\n    and direction = 'outgoing'\nGROUP BY i\nORDER BY i",
              "rawQuery": "SELECT     (intDiv(toUInt32(metricDateTime), 1) * 1) * 1000 as i,     sum(packets) FROM fastnetmon.total_metrics WHERE     metricDate >= toDate(1507664716) AND metricDateTime >= toDateTime(1507664716)     and direction = 'outgoing' GROUP BY i ORDER BY i",
              "refId": "A",
              "resultFormat": "time_series",
              "round": "0s",
              "table": "total_metrics",
              "tableLoading": false
            }
          ],
          "thresholds": "1500000,1800000",
          "title": "PPS OUT",
          "type": "singlestat",
          "valueFontSize": "50%",
          "valueMaps": [
            {
              "op": "=",
              "text": "N/A",
              "value": "null"
            }
          ],
          "valueName": "avg"
        },
        {
          "cacheTimeout": null,
          "colorBackground": false,
          "colorValue": true,
          "colors": [
            "rgba(50, 172, 45, 0.97)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(245, 54, 54, 0.9)"
          ],
          "datasource": "${DS_CLICKHOUSE}",
          "format": "bps",
          "gauge": {
            "maxValue": 15000000000,
            "minValue": 0,
            "show": true,
            "thresholdLabels": false,
            "thresholdMarkers": true
          },
          "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": "50%",
          "prefix": "",
          "prefixFontSize": "50%",
          "rangeMaps": [
            {
              "from": "null",
              "text": "N/A",
              "to": "null"
            }
          ],
          "span": 5,
          "sparkline": {
            "fillColor": "rgba(31, 118, 189, 0.18)",
            "full": false,
            "lineColor": "rgb(31, 120, 193)",
            "show": false
          },
          "tableColumn": "",
          "targets": [
            {
              "database": "fastnetmon",
              "dateColDataType": "metricDate",
              "dateLoading": false,
              "dateTimeColDataType": "metricDateTime",
              "datetimeLoading": false,
              "dsType": "influxdb",
              "formattedQuery": "<font color=\"darkorange\">SELECT</font><br />    <font color=\"darkcyan\">$timeSeries</font> <font color=\"darkorange\">as</font> i,<br />    <font color=\"navajowhite\">sum</font>(bits)<br /><font color=\"darkorange\">FROM</font> <font color=\"darkcyan\">$table</font><br /><font color=\"darkorange\">WHERE</font><br />    <font color=\"darkcyan\">$timeFilter</font><br />    <font color=\"yellow\">and</font> direction <font color=\"yellow\">=</font> <font color=\"lightgreen\">'outgoing'</font><br /><font color=\"darkorange\">GROUP BY</font> i<br /><font color=\"darkorange\">ORDER BY</font> i",
              "groupBy": [
                {
                  "params": [
                    "$__interval"
                  ],
                  "type": "time"
                },
                {
                  "params": [
                    "null"
                  ],
                  "type": "fill"
                }
              ],
              "interval": "1s",
              "intervalFactor": 1,
              "orderByTime": "ASC",
              "policy": "default",
              "query": "SELECT\n    $timeSeries as i,\n    sum(bits)\nFROM $table\nWHERE\n    $timeFilter\n    and direction = 'outgoing'\nGROUP BY i\nORDER BY i",
              "rawQuery": "SELECT     (intDiv(toUInt32(metricDateTime), 1) * 1) * 1000 as i,     sum(bits) FROM fastnetmon.total_metrics WHERE     metricDate >= toDate(1507664716) AND metricDateTime >= toDateTime(1507664716)     and direction = 'outgoing' GROUP BY i ORDER BY i",
              "refId": "A",
              "resultFormat": "time_series",
              "round": "0s",
              "select": [
                [
                  {
                    "params": [
                      "value"
                    ],
                    "type": "field"
                  },
                  {
                    "params": [],
                    "type": "mean"
                  }
                ]
              ],
              "table": "total_metrics",
              "tableLoading": false,
              "tags": []
            }
          ],
          "thresholds": "12000000000,14000000000",
          "title": "MBPS OUT",
          "type": "singlestat",
          "valueFontSize": "50%",
          "valueMaps": [
            {
              "op": "=",
              "text": "N/A",
              "value": "null"
            }
          ],
          "valueName": "current"
        }
      ],
      "repeat": null,
      "repeatIteration": null,
      "repeatRowId": null,
      "showTitle": false,
      "title": "Dashboard Row",
      "titleSize": "h6"
    },
    {
      "collapse": false,
      "height": 222,
      "panels": [
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_CLICKHOUSE}",
          "fill": 1,
          "id": 1,
          "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": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "span": 6,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "database": "fastnetmon",
              "dateColDataType": "metricDate",
              "dateLoading": false,
              "dateTimeColDataType": "metricDateTime",
              "datetimeLoading": false,
              "dsType": "influxdb",
              "formattedQuery": "<font color=\"darkorange\">SELECT</font><br />    <font color=\"darkcyan\">$timeSeries</font> <font color=\"darkorange\">as</font> i,<br />    <font color=\"navajowhite\">sum</font>(bits)<br /><font color=\"darkorange\">FROM</font> <font color=\"darkcyan\">$table</font><br /><font color=\"darkorange\">WHERE</font><br />    <font color=\"darkcyan\">$timeFilter</font><br />    <font color=\"yellow\">and</font> direction <font color=\"yellow\">=</font> <font color=\"lightgreen\">'incoming'</font><br /><font color=\"darkorange\">GROUP BY</font> i<br /><font color=\"darkorange\">ORDER BY</font> i",
              "groupBy": [
                {
                  "params": [
                    "$__interval"
                  ],
                  "type": "time"
                },
                {
                  "params": [
                    "null"
                  ],
                  "type": "fill"
                }
              ],
              "interval": "1s",
              "intervalFactor": 1,
              "orderByTime": "ASC",
              "policy": "default",
              "query": "SELECT\n    $timeSeries as i,\n    sum(bits)\nFROM $table\nWHERE\n    $timeFilter\n    and direction = 'incoming'\nGROUP BY i\nORDER BY i",
              "rawQuery": "SELECT     (intDiv(toUInt32(metricDateTime), 1) * 1) * 1000 as i,     sum(bits) FROM fastnetmon.total_metrics WHERE     metricDate >= toDate(1507664716) AND metricDateTime >= toDateTime(1507664716)     and direction = 'incoming' GROUP BY i ORDER BY i",
              "refId": "A",
              "resultFormat": "time_series",
              "round": "0s",
              "select": [
                [
                  {
                    "params": [
                      "value"
                    ],
                    "type": "field"
                  },
                  {
                    "params": [],
                    "type": "mean"
                  }
                ]
              ],
              "table": "total_metrics",
              "tableLoading": false,
              "tags": []
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Traffic incoming",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "transparent": true,
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": false,
            "values": []
          },
          "yaxes": [
            {
              "format": "Bps",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": false
            }
          ]
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_CLICKHOUSE}",
          "fill": 1,
          "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": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "span": 6,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "database": "fastnetmon",
              "dateColDataType": "metricDate",
              "dateLoading": false,
              "dateTimeColDataType": "metricDateTime",
              "datetimeLoading": false,
              "dsType": "influxdb",
              "formattedQuery": "<font color=\"darkorange\">SELECT</font><br />    <font color=\"darkcyan\">$timeSeries</font> <font color=\"darkorange\">as</font> i,<br />    <font color=\"navajowhite\">sum</font>(packets)<br /><font color=\"darkorange\">FROM</font> <font color=\"darkcyan\">$table</font><br /><font color=\"darkorange\">WHERE</font><br />    <font color=\"darkcyan\">$timeFilter</font><br />    <font color=\"yellow\">and</font> direction <font color=\"yellow\">=</font> <font color=\"lightgreen\">'incoming'</font><br /><font color=\"darkorange\">GROUP BY</font> i<br /><font color=\"darkorange\">ORDER BY</font> i",
              "groupBy": [
                {
                  "params": [
                    "$__interval"
                  ],
                  "type": "time"
                },
                {
                  "params": [
                    "null"
                  ],
                  "type": "fill"
                }
              ],
              "interval": "1s",
              "intervalFactor": 1,
              "orderByTime": "ASC",
              "policy": "default",
              "query": "SELECT\n    $timeSeries as i,\n    sum(packets)\nFROM $table\nWHERE\n    $timeFilter\n    and direction = 'incoming'\nGROUP BY i\nORDER BY i",
              "rawQuery": "SELECT     (intDiv(toUInt32(metricDateTime), 1) * 1) * 1000 as i,     sum(packets) FROM fastnetmon.total_metrics WHERE     metricDate >= toDate(1507664716) AND metricDateTime >= toDateTime(1507664716)     and direction = 'incoming' GROUP BY i ORDER BY i",
              "refId": "A",
              "resultFormat": "time_series",
              "round": "0s",
              "select": [
                [
                  {
                    "params": [
                      "value"
                    ],
                    "type": "field"
                  },
                  {
                    "params": [],
                    "type": "mean"
                  }
                ]
              ],
              "table": "total_metrics",
              "tableLoading": false,
              "tags": []
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Packets incoming",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "transparent": true,
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": false,
            "values": []
          },
          "yaxes": [
            {
              "format": "Bps",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": false
            }
          ]
        },
        {
          "aliasColors": {
            "sum(bits)": "#82B5D8"
          },
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_CLICKHOUSE}",
          "fill": 1,
          "id": 3,
          "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": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [
            {
              "alias": "sum(bits)",
              "transform": "negative-Y"
            }
          ],
          "spaceLength": 10,
          "span": 6,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "database": "fastnetmon",
              "dateColDataType": "metricDate",
              "dateLoading": false,
              "dateTimeColDataType": "metricDateTime",
              "datetimeLoading": false,
              "dsType": "influxdb",
              "formattedQuery": "<font color=\"darkorange\">SELECT</font><br />    <font color=\"darkcyan\">$timeSeries</font> <font color=\"darkorange\">as</font> i,<br />    <font color=\"navajowhite\">sum</font>(bits)<br /><font color=\"darkorange\">FROM</font> <font color=\"darkcyan\">$table</font><br /><font color=\"darkorange\">WHERE</font><br />    <font color=\"darkcyan\">$timeFilter</font><br />    <font color=\"yellow\">and</font> direction <font color=\"yellow\">=</font> <font color=\"lightgreen\">'outgoing'</font><br /><font color=\"darkorange\">GROUP BY</font> i<br /><font color=\"darkorange\">ORDER BY</font> i",
              "groupBy": [
                {
                  "params": [
                    "$__interval"
                  ],
                  "type": "time"
                },
                {
                  "params": [
                    "null"
                  ],
                  "type": "fill"
                }
              ],
              "interval": "1s",
              "intervalFactor": 1,
              "orderByTime": "ASC",
              "policy": "default",
              "query": "SELECT\n    $timeSeries as i,\n    sum(bits)\nFROM $table\nWHERE\n    $timeFilter\n    and direction = 'outgoing'\nGROUP BY i\nORDER BY i",
              "rawQuery": "SELECT     (intDiv(toUInt32(metricDateTime), 1) * 1) * 1000 as i,     sum(bits) FROM fastnetmon.total_metrics WHERE     metricDate >= toDate(1507664716) AND metricDateTime >= toDateTime(1507664716)     and direction = 'outgoing' GROUP BY i ORDER BY i",
              "refId": "A",
              "resultFormat": "time_series",
              "round": "0s",
              "select": [
                [
                  {
                    "params": [
                      "value"
                    ],
                    "type": "field"
                  },
                  {
                    "params": [],
                    "type": "mean"
                  }
                ]
              ],
              "table": "total_metrics",
              "tableLoading": false,
              "tags": []
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Traffic outgoing",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "transparent": true,
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": false,
            "values": []
          },
          "yaxes": [
            {
              "format": "Bps",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": false
            }
          ]
        },
        {
          "aliasColors": {
            "sum(packets)": "#82B5D8"
          },
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_CLICKHOUSE}",
          "fill": 1,
          "id": 4,
          "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": [],
          "nullPointMode": "null",
          "percentage": false,
          "pointradius": 5,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [
            {
              "alias": "sum(packets)",
              "transform": "negative-Y"
            }
          ],
          "spaceLength": 10,
          "span": 6,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "database": "fastnetmon",
              "dateColDataType": "metricDate",
              "dateLoading": false,
              "dateTimeColDataType": "metricDateTime",
              "datetimeLoading": false,
              "dsType": "influxdb",
              "formattedQuery": "<font color=\"darkorange\">SELECT</font><br />    <font color=\"darkcyan\">$timeSeries</font> <font color=\"darkorange\">as</font> i,<br />    <font color=\"navajowhite\">sum</font>(packets)<br /><font color=\"darkorange\">FROM</font> <font color=\"darkcyan\">$table</font><br /><font color=\"darkorange\">WHERE</font><br />    <font color=\"darkcyan\">$timeFilter</font><br />    <font color=\"yellow\">and</font> direction <font color=\"yellow\">=</font> <font color=\"lightgreen\">'outgoing'</font><br /><font color=\"darkorange\">GROUP BY</font> i<br /><font color=\"darkorange\">ORDER BY</font> i",
              "groupBy": [
                {
                  "params": [
                    "$__interval"
                  ],
                  "type": "time"
                },
                {
                  "params": [
                    "null"
                  ],
                  "type": "fill"
                }
              ],
              "interval": "1s",
              "intervalFactor": 1,
              "orderByTime": "ASC",
              "policy": "default",
              "query": "SELECT\n    $timeSeries as i,\n    sum(packets)\nFROM $table\nWHERE\n    $timeFilter\n    and direction = 'outgoing'\nGROUP BY i\nORDER BY i",
              "rawQuery": "SELECT     (intDiv(toUInt32(metricDateTime), 1) * 1) * 1000 as i,     sum(packets) FROM fastnetmon.total_metrics WHERE     metricDate >= toDate(1507664716) AND metricDateTime >= toDateTime(1507664716)     and direction = 'outgoing' GROUP BY i ORDER BY i",
              "refId": "A",
              "resultFormat": "time_series",
              "round": "0s",
              "select": [
                [
                  {
                    "params": [
                      "value"
                    ],
                    "type": "field"
                  },
                  {
                    "params": [],
                    "type": "mean"
                  }
                ]
              ],
              "table": "total_metrics",
              "tableLoading": false,
              "tags": []
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeShift": null,
          "title": "Packets outgoing",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "transparent": true,
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": false,
            "values": []
          },
          "yaxes": [
            {
              "format": "Bps",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": true
            },
            {
              "format": "short",
              "label": null,
              "logBase": 1,
              "max": null,
              "min": null,
              "show": false
            }
          ]
        }
      ],
      "repeat": null,
      "repeatIteration": null,
      "repeatRowId": null,
      "showTitle": false,
      "title": "Dashboard Row",
      "titleSize": "h6"
    }
  ],
  "schemaVersion": 14,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": []
  },
  "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 Advanced ClickHouse",
  "version": 25,
  "description": "Fastnetmon ADVANCED metrics with ClickHouse backend"
}