Grafana dashboard: Iptables Montoring Dashboard
Description: Node exporter extension with iptables support

Used together with https://github.com/LeiShi1313/node_exporter

{
  "__inputs": [
    {
      "name": "DS_PROMETHEUS",
      "label": "Prometheus",
      "description": "",
      "type": "datasource",
      "pluginId": "prometheus",
      "pluginName": "Prometheus"
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "7.3.6"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "prometheus",
      "name": "Prometheus",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "stat",
      "name": "Stat",
      "version": ""
    },
    {
      "type": "panel",
      "id": "table-old",
      "name": "Table (old)",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "limit": 100,
        "name": "Annotations & Alerts",
        "showIn": 0,
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "gnetId": 13674,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1609723382271,
  "links": [],
  "panels": [
    {
      "collapsed": false,
      "datasource": "${DS_PROMETHEUS}",
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 44,
      "panels": [],
      "title": "Overview",
      "type": "row"
    },
    {
      "columns": [],
      "datasource": "${DS_PROMETHEUS}",
      "fieldConfig": {
        "defaults": {
          "custom": {}
        },
        "overrides": []
      },
      "fontSize": "90%",
      "gridPos": {
        "h": 6,
        "w": 12,
        "x": 0,
        "y": 1
      },
      "id": 17,
      "pageSize": null,
      "showHeader": true,
      "sort": {
        "col": 4,
        "desc": false
      },
      "styles": [
        {
          "alias": "Time",
          "align": "auto",
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "link": false,
          "pattern": "Time",
          "type": "hidden"
        },
        {
          "alias": "",
          "align": "auto",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "__name__",
          "thresholds": [],
          "type": "hidden",
          "unit": "short"
        },
        {
          "alias": "Instance",
          "align": "auto",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "instance",
          "thresholds": [],
          "type": "string",
          "unit": "short"
        },
        {
          "alias": "Job",
          "align": "auto",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "job",
          "thresholds": [],
          "type": "string",
          "unit": "short"
        },
        {
          "alias": "Uptime",
          "align": "auto",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "Value #A",
          "thresholds": [],
          "type": "number",
          "unit": "s"
        },
        {
          "alias": "Downlink",
          "align": "auto",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 3,
          "mappingType": 1,
          "pattern": "Value #B",
          "thresholds": [],
          "type": "number",
          "unit": "decbytes"
        },
        {
          "alias": "Uplink",
          "align": "auto",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 3,
          "mappingType": 1,
          "pattern": "Value #C",
          "thresholds": [],
          "type": "number",
          "unit": "decbytes"
        },
        {
          "alias": "",
          "align": "auto",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "/.*/",
          "thresholds": [],
          "type": "hidden",
          "unit": "short"
        }
      ],
      "targets": [
        {
          "expr": "node_v2ray_uptime{job=~\"$job\",instance=~\"$instance\"}",
          "format": "table",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        },
        {
          "expr": "sum by (instance) (increase(node_network_receive_bytes_total{job=~\"$job\",instance=~\"$instance\"}[$__range]))",
          "format": "table",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "B"
        },
        {
          "expr": "sum by (instance) (increase(node_network_transmit_bytes_total{job=~\"$job\",instance=~\"$instance\"}[$__range]))",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "C"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Real-Time Overview",
      "transform": "table",
      "type": "table-old"
    },
    {
      "aliasColors": {
        "Interfaces": "semi-dark-red",
        "Value": "dark-blue"
      },
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_PROMETHEUS}",
      "fieldConfig": {
        "defaults": {
          "custom": {},
          "links": []
        },
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 6,
        "w": 12,
        "x": 12,
        "y": 1
      },
      "hiddenSeries": false,
      "id": 8,
      "legend": {
        "alignAsTable": false,
        "avg": false,
        "current": false,
        "hideEmpty": true,
        "hideZero": true,
        "max": false,
        "min": false,
        "rightSide": true,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "7.3.6",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "sum(irate(v2ray_traffic_downlink_bytes_total{job=~\"$job\",dimension=~\"inbound|iptables\"}[5m]))",
          "interval": "",
          "legendFormat": "Downlink",
          "refId": "A"
        },
        {
          "expr": "sum by (instance) (irate(node_network_receive_bytes_total{job=~\"$job\",instance=~\"$instance\"}[$__range]))",
          "interval": "",
          "legendFormat": "{{instace}}",
          "refId": "B"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "$target Bandwidth",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "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": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "collapsed": true,
      "datasource": "${DS_PROMETHEUS}",
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 7
      },
      "id": 4,
      "panels": [
        {
          "datasource": "${DS_PROMETHEUS}",
          "fieldConfig": {
            "defaults": {
              "custom": {},
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "red",
                    "value": null
                  },
                  {
                    "color": "red",
                    "value": 604800
                  },
                  {
                    "color": "#EAB839",
                    "value": 1209600
                  },
                  {
                    "color": "green",
                    "value": 2592000
                  }
                ]
              },
              "unit": "s"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 2,
            "w": 3,
            "x": 0,
            "y": 8
          },
          "id": 167,
          "options": {
            "colorMode": "value",
            "graphMode": "area",
            "justifyMode": "auto",
            "orientation": "auto",
            "reduceOptions": {
              "calcs": [
                "mean"
              ],
              "fields": "",
              "values": false
            },
            "textMode": "auto"
          },
          "pluginVersion": "7.2.1",
          "scopedVars": {
            "instance": {
              "selected": false,
              "text": "cn2.monitor.2cn.io:80",
              "value": "cn2.monitor.2cn.io:80"
            }
          },
          "targets": [
            {
              "expr": "avg(time() - node_boot_time_seconds{job=~\"$job\", instance=~\"$instance\"})",
              "instant": true,
              "interval": "",
              "legendFormat": "Uptime",
              "refId": "A"
            }
          ],
          "timeFrom": null,
          "timeShift": null,
          "title": "Uptime",
          "type": "stat"
        },
        {
          "cacheTimeout": null,
          "datasource": "${DS_PROMETHEUS}",
          "description": "",
          "fieldConfig": {
            "defaults": {
              "custom": {},
              "mappings": [
                {
                  "id": 0,
                  "op": "=",
                  "text": "N/A",
                  "type": 1,
                  "value": "null"
                }
              ],
              "nullValueMode": "null",
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "rgba(245, 54, 54, 0.9)",
                    "value": null
                  },
                  {
                    "color": "rgba(237, 129, 40, 0.89)",
                    "value": 1
                  },
                  {
                    "color": "rgba(50, 172, 45, 0.97)",
                    "value": 2
                  }
                ]
              },
              "unit": "short"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 2,
            "w": 3,
            "x": 3,
            "y": 8
          },
          "id": 244,
          "interval": null,
          "links": [],
          "maxDataPoints": 100,
          "options": {
            "colorMode": "value",
            "graphMode": "none",
            "justifyMode": "auto",
            "orientation": "horizontal",
            "reduceOptions": {
              "calcs": [
                "lastNotNull"
              ],
              "fields": "",
              "values": false
            },
            "textMode": "value"
          },
          "pluginVersion": "7.2.1",
          "scopedVars": {
            "instance": {
              "selected": false,
              "text": "cn2.monitor.2cn.io:80",
              "value": "cn2.monitor.2cn.io:80"
            }
          },
          "targets": [
            {
              "expr": "count(node_cpu_seconds_total{job=~\"$job\",instance=~\"$instance\", mode='system'})",
              "format": "time_series",
              "instant": true,
              "interval": "",
              "intervalFactor": 1,
              "legendFormat": "",
              "refId": "A",
              "step": 20
            }
          ],
          "title": "CPU",
          "type": "stat"
        },
        {
          "datasource": "${DS_PROMETHEUS}",
          "fieldConfig": {
            "defaults": {
              "custom": {},
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  },
                  {
                    "color": "#EAB839",
                    "value": 50
                  },
                  {
                    "color": "red",
                    "value": 80
                  }
                ]
              },
              "unit": "percent"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 4,
            "w": 6,
            "x": 6,
            "y": 8
          },
          "id": 218,
          "options": {
            "colorMode": "value",
            "graphMode": "area",
            "justifyMode": "auto",
            "orientation": "auto",
            "reduceOptions": {
              "calcs": [
                "mean"
              ],
              "fields": "",
              "values": false
            },
            "textMode": "auto"
          },
          "pluginVersion": "7.2.1",
          "scopedVars": {
            "instance": {
              "selected": false,
              "text": "cn2.monitor.2cn.io:80",
              "value": "cn2.monitor.2cn.io:80"
            }
          },
          "targets": [
            {
              "expr": "100 - (avg(irate(node_cpu_seconds_total{job=~\"$job\", instance=~\"$instance\",mode=\"idle\"}[1m])) * 100)",
              "interval": "",
              "legendFormat": "CPU",
              "refId": "A"
            },
            {
              "expr": "(1 - (node_memory_MemAvailable_bytes{job=~\"$job\", instance=~\"$instance\"} / (node_memory_MemTotal_bytes{job=~\"$job\", instance=~\"$instance\"})))* 100",
              "interval": "",
              "legendFormat": "Memory",
              "refId": "B"
            },
            {
              "expr": "max((node_filesystem_size_bytes{job=~\"$job\",instance=~\"$instance\", fstype=~\"ext.?|xfs\"}-node_filesystem_free_bytes{job=~\"$job\",instance=~\"$instance\",fstype=~\"ext.?|xfs\"}) *100/(node_filesystem_avail_bytes {job=~\"$job\",instance=~\"$instance\",fstype=~\"ext.?|xfs\"}+(node_filesystem_size_bytes{job=~\"$job\",instance=~\"$instance\",fstype=~\"ext.?|xfs\"}-node_filesystem_free_bytes{job=~\"$job\",instance=~\"$instance\",fstype=~\"ext.?|xfs\"})))",
              "interval": "",
              "legendFormat": "Disk",
              "refId": "C"
            }
          ],
          "timeFrom": null,
          "timeShift": null,
          "title": "Usage",
          "type": "stat"
        },
        {
          "aliasColors": {
            "eth0": "dark-red"
          },
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_PROMETHEUS}",
          "fieldConfig": {
            "defaults": {
              "custom": {}
            },
            "overrides": []
          },
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 6,
            "w": 12,
            "x": 12,
            "y": 8
          },
          "hiddenSeries": false,
          "id": 141,
          "legend": {
            "alignAsTable": false,
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "rightSide": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "7.2.1",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "scopedVars": {
            "instance": {
              "selected": false,
              "text": "cn2.monitor.2cn.io:80",
              "value": "cn2.monitor.2cn.io:80"
            }
          },
          "seriesOverrides": [
            {
              "alias": ""
            }
          ],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "irate(node_v2ray_upload_bytes_total{job=~\"$job\",instance=~\"$instance\",dimension=~\"$dimension\",target=~\"$target\"}[5m])",
              "hide": false,
              "interval": "",
              "legendFormat": "{{target}}",
              "refId": "A"
            },
            {
              "expr": "irate(node_iptables_upload_bytes_total{job=~\"$job\",instance=~\"$instance\",chain=~\"$dimension\",rule=~\"$target\"}[5m])",
              "interval": "",
              "legendFormat": "{{rule}}",
              "refId": "B"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "$instance upload status",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "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": true
            }
          ],
          "yaxis": {
            "align": false,
            "alignLevel": null
          }
        },
        {
          "cacheTimeout": null,
          "datasource": "${DS_PROMETHEUS}",
          "description": "",
          "fieldConfig": {
            "defaults": {
              "custom": {},
              "decimals": 0,
              "mappings": [
                {
                  "id": 0,
                  "op": "=",
                  "text": "N/A",
                  "type": 1,
                  "value": "null"
                }
              ],
              "nullValueMode": "null",
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "red",
                    "value": null
                  },
                  {
                    "color": "red",
                    "value": 536870912
                  },
                  {
                    "color": "#EAB839",
                    "value": 1073741824
                  },
                  {
                    "color": "rgba(50, 172, 45, 0.97)",
                    "value": 2147483648
                  }
                ]
              },
              "unit": "bytes"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 2,
            "w": 3,
            "x": 0,
            "y": 10
          },
          "id": 246,
          "interval": null,
          "links": [],
          "maxDataPoints": 100,
          "options": {
            "colorMode": "value",
            "graphMode": "none",
            "justifyMode": "auto",
            "orientation": "horizontal",
            "reduceOptions": {
              "calcs": [
                "lastNotNull"
              ],
              "fields": "",
              "values": false
            },
            "textMode": "auto"
          },
          "pluginVersion": "7.2.1",
          "scopedVars": {
            "instance": {
              "selected": false,
              "text": "cn2.monitor.2cn.io:80",
              "value": "cn2.monitor.2cn.io:80"
            }
          },
          "targets": [
            {
              "expr": "sum(node_memory_MemTotal_bytes{job=~\"$job\",instance=~\"$instance\"})",
              "format": "time_series",
              "instant": true,
              "interval": "",
              "intervalFactor": 1,
              "legendFormat": "{{instance}}",
              "refId": "A",
              "step": 20
            }
          ],
          "title": "Memory",
          "type": "stat"
        },
        {
          "datasource": "${DS_PROMETHEUS}",
          "fieldConfig": {
            "defaults": {
              "custom": {},
              "mappings": [],
              "thresholds": {
                "mode": "absolute",
                "steps": [
                  {
                    "color": "green",
                    "value": null
                  }
                ]
              },
              "unit": "bytes"
            },
            "overrides": []
          },
          "gridPos": {
            "h": 2,
            "w": 3,
            "x": 3,
            "y": 10
          },
          "id": 264,
          "options": {
            "colorMode": "value",
            "graphMode": "area",
            "justifyMode": "auto",
            "orientation": "auto",
            "reduceOptions": {
              "calcs": [
                "mean"
              ],
              "fields": "",
              "values": false
            },
            "textMode": "auto"
          },
          "pluginVersion": "7.2.1",
          "scopedVars": {
            "instance": {
              "selected": false,
              "text": "cn2.monitor.2cn.io:80",
              "value": "cn2.monitor.2cn.io:80"
            }
          },
          "targets": [
            {
              "expr": "node_filesystem_size_bytes{job=~\"$job\",instance=~'$instance',fstype=~\"ext.*|xfs\",mountpoint !~\".*pod.*\"}-0",
              "instant": true,
              "interval": "",
              "legendFormat": "",
              "refId": "A"
            }
          ],
          "timeFrom": null,
          "timeShift": null,
          "title": "Disk",
          "type": "stat"
        },
        {
          "columns": [],
          "datasource": "${DS_PROMETHEUS}",
          "fieldConfig": {
            "defaults": {
              "custom": {}
            },
            "overrides": []
          },
          "fontSize": "90%",
          "gridPos": {
            "h": 8,
            "w": 12,
            "x": 0,
            "y": 12
          },
          "id": 134,
          "pageSize": null,
          "scopedVars": {
            "instance": {
              "selected": false,
              "text": "cn2.monitor.2cn.io:80",
              "value": "cn2.monitor.2cn.io:80"
            }
          },
          "showHeader": true,
          "sort": {
            "col": 5,
            "desc": true
          },
          "styles": [
            {
              "alias": "Time",
              "align": "auto",
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "pattern": "Time",
              "type": "hidden"
            },
            {
              "alias": "Chain",
              "align": "auto",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "decimals": 2,
              "mappingType": 1,
              "pattern": "chain",
              "thresholds": [],
              "type": "string",
              "unit": "short"
            },
            {
              "alias": "Instance",
              "align": "auto",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 2,
              "mappingType": 1,
              "pattern": "instance",
              "thresholds": [],
              "type": "hidden",
              "unit": "short"
            },
            {
              "alias": "Job",
              "align": "auto",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 2,
              "mappingType": 1,
              "pattern": "job",
              "thresholds": [],
              "type": "hidden",
              "unit": "short"
            },
            {
              "alias": "Rule",
              "align": "auto",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 2,
              "mappingType": 1,
              "pattern": "rule",
              "thresholds": [],
              "type": "string",
              "unit": "short"
            },
            {
              "alias": "Download",
              "align": "auto",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 3,
              "mappingType": 1,
              "pattern": "Value #A",
              "thresholds": [],
              "type": "number",
              "unit": "decbytes"
            },
            {
              "alias": "Upload",
              "align": "auto",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 3,
              "mappingType": 1,
              "pattern": "Value #B",
              "thresholds": [],
              "type": "number",
              "unit": "decbytes"
            },
            {
              "alias": "",
              "align": "auto",
              "colorMode": null,
              "colors": [
                "rgba(245, 54, 54, 0.9)",
                "rgba(237, 129, 40, 0.89)",
                "rgba(50, 172, 45, 0.97)"
              ],
              "dateFormat": "YYYY-MM-DD HH:mm:ss",
              "decimals": 2,
              "mappingType": 1,
              "pattern": "/.*/",
              "thresholds": [],
              "type": "hidden",
              "unit": "short"
            }
          ],
          "targets": [
            {
              "expr": "increase(node_iptables_download_bytes_total{job=~\"$job\",instance=~\"$instance\"}[$__range])",
              "format": "table",
              "instant": true,
              "interval": "",
              "legendFormat": "",
              "refId": "A"
            },
            {
              "expr": "increase(node_iptables_upload_bytes_total{job=~\"$job\",instance=~\"$instance\"}[$__range])",
              "format": "table",
              "instant": true,
              "interval": "",
              "legendFormat": "",
              "refId": "B"
            }
          ],
          "timeFrom": null,
          "timeShift": null,
          "title": "Real-Time Detail Overview - Iptables",
          "transform": "table",
          "type": "table-old"
        },
        {
          "aliasColors": {
            "eth0": "dark-red"
          },
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_PROMETHEUS}",
          "fieldConfig": {
            "defaults": {
              "custom": {}
            },
            "overrides": []
          },
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 6,
            "w": 12,
            "x": 12,
            "y": 14
          },
          "hiddenSeries": false,
          "id": 132,
          "legend": {
            "alignAsTable": false,
            "avg": false,
            "current": false,
            "max": false,
            "min": false,
            "rightSide": false,
            "show": true,
            "total": false,
            "values": false
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "7.2.1",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "scopedVars": {
            "instance": {
              "selected": false,
              "text": "cn2.monitor.2cn.io:80",
              "value": "cn2.monitor.2cn.io:80"
            }
          },
          "seriesOverrides": [
            {
              "alias": ""
            }
          ],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "expr": "irate(node_v2ray_download_bytes_total{job=~\"$job\",instance=~\"$instance\",dimension=~\"$dimension\",target=~\"$target\"}[5m])",
              "hide": false,
              "interval": "",
              "legendFormat": "{{target}}",
              "refId": "A"
            },
            {
              "expr": "irate(node_iptables_download_bytes_total{job=~\"$job\",instance=~\"$instance\",chain=~\"$dimension\",rule=~\"$target\"}[5m])",
              "interval": "",
              "legendFormat": "{{rule}}",
              "refId": "B"
            }
          ],
          "thresholds": [],
          "timeFrom": null,
          "timeRegions": [],
          "timeShift": null,
          "title": "$instance download status",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "buckets": null,
            "mode": "time",
            "name": null,
            "show": true,
            "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": true
            }
          ],
          "yaxis": {
            "align": false,
            "alignLevel": null
          }
        }
      ],
      "repeat": "instance",
      "title": "$instance",
      "type": "row"
    }
  ],
  "refresh": "10s",
  "schemaVersion": 26,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "allValue": ".*",
        "current": {},
        "datasource": "${DS_PROMETHEUS}",
        "definition": "label_values(node_uname_info, job)",
        "error": null,
        "hide": 0,
        "includeAll": true,
        "label": "Job",
        "multi": true,
        "name": "job",
        "options": [],
        "query": "label_values(node_uname_info, job)",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": ".*",
        "current": {},
        "datasource": "${DS_PROMETHEUS}",
        "definition": "label_values(node_uname_info{job=~\"$job\"}, nodename)",
        "error": null,
        "hide": 0,
        "includeAll": true,
        "label": "主机名",
        "multi": true,
        "name": "hostname",
        "options": [],
        "query": "label_values(node_uname_info{job=~\"$job\"}, nodename)",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": ".*",
        "current": {},
        "datasource": "${DS_PROMETHEUS}",
        "definition": "label_values(node_uname_info{job=~\"$job\",nodename=~\"$hostname\"},instance)",
        "error": null,
        "hide": 0,
        "includeAll": true,
        "label": "Instance",
        "multi": true,
        "name": "instance",
        "options": [],
        "query": "label_values(node_uname_info{job=~\"$job\",nodename=~\"$hostname\"},instance)",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": ".*?",
        "current": {},
        "datasource": "${DS_PROMETHEUS}",
        "definition": "query_result(count_over_time(node_v2ray_download_bytes_total{job=~\"$job\",instance=~\"$instance\"}[$__range]) or count_over_time(node_iptables_download_bytes_total{job=~\"$job\",instance=~\"$instance\"}[$__range]))",
        "error": null,
        "hide": 0,
        "includeAll": true,
        "label": "Dimension",
        "multi": true,
        "name": "dimension",
        "options": [],
        "query": "query_result(count_over_time(node_v2ray_download_bytes_total{job=~\"$job\",instance=~\"$instance\"}[$__range]) or count_over_time(node_iptables_download_bytes_total{job=~\"$job\",instance=~\"$instance\"}[$__range]))",
        "refresh": 1,
        "regex": "/(?:dimension|chain)=\"(.*?)\"/",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": ".*?",
        "current": {},
        "datasource": "${DS_PROMETHEUS}",
        "definition": "query_result(count_over_time(node_v2ray_download_bytes_total{job=~\"$job\",instance=~\"$instance\"}[$__range]) or count_over_time(node_iptables_download_bytes_total{job=~\"$job\",instance=~\"$instance\"}[$__range]))",
        "error": null,
        "hide": 0,
        "includeAll": true,
        "label": "Target",
        "multi": true,
        "name": "target",
        "options": [],
        "query": "query_result(count_over_time(node_v2ray_download_bytes_total{job=~\"$job\",instance=~\"$instance\"}[$__range]) or count_over_time(node_iptables_download_bytes_total{job=~\"$job\",instance=~\"$instance\"}[$__range]))",
        "refresh": 1,
        "regex": "/(?:target|rule)=\"(.*?)\"/",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-30m",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ]
  },
  "timezone": "",
  "title": "Iptables Montoring Dashboard",
  "uid": "CCSvIIEZzzz",
  "version": 18,
  "description": "Node exporter extension with iptables support"
}