Grafana dashboard: OPNsense Firewall - Unbound
Description: OPNsense Firewall

How to : https://github.com/b4b857f6ee/opnsense_grafana_dashboard

{
  "__inputs": [
    {
      "name": "DS_INFLUXDB",
      "label": "InfluxDB",
      "description": "",
      "type": "datasource",
      "pluginId": "influxdb",
      "pluginName": "InfluxDB"
    }
  ],
  "__requires": [
    {
      "type": "panel",
      "id": "flant-statusmap-panel",
      "name": "Statusmap",
      "version": "0.3.4"
    },
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "7.3.7"
    },
    {
      "type": "panel",
      "id": "grafana-piechart-panel",
      "name": "Pie Chart",
      "version": "1.3.9"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "influxdb",
      "name": "InfluxDB",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "magnesium-wordcloud-panel",
      "name": "Word cloud",
      "version": "1.1.3"
    },
    {
      "type": "panel",
      "id": "table",
      "name": "Table",
      "version": ""
    },
    {
      "type": "panel",
      "id": "text",
      "name": "Text",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "gnetId": 13385,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1611938305495,
  "links": [],
  "panels": [
    {
      "datasource": "${DS_INFLUXDB}",
      "fieldConfig": {
        "defaults": {
          "custom": {}
        },
        "overrides": []
      },
      "gridPos": {
        "h": 2,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 37,
      "options": {
        "content": "<img src=\"https://opnsense.org/wp-content/themes/OPNsense/assets/img/xopnsense.png.pagespeed.ic.l-2rAT7LtW.png\" >\n         ",
        "mode": "html"
      },
      "pluginVersion": "7.3.7",
      "targets": [
        {
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "tags": []
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "",
      "transparent": true,
      "type": "text"
    },
    {
      "cacheTimeout": null,
      "datasource": "$Elasticsearch",
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": "left",
            "filterable": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "string"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 2
      },
      "id": 12,
      "interval": null,
      "links": [],
      "maxDataPoints": 3,
      "options": {
        "series_index": 0,
        "wordCloudOptions": {
          "deterministic": true,
          "enableTooltip": true,
          "fontFamily": "arial",
          "fontSizes": [
            15,
            80
          ],
          "padding": 1,
          "rotationAngles": [
            0,
            0
          ],
          "rotations": 2,
          "scale": "sqrt",
          "spiral": "archimedean",
          "transitionDuration": 800
        }
      },
      "pluginVersion": "7.2.1",
      "targets": [
        {
          "alias": "",
          "bucketAggs": [
            {
              "$$hashKey": "object:54",
              "fake": true,
              "field": "client.ip",
              "id": "4",
              "settings": {
                "min_doc_count": "1",
                "order": "desc",
                "orderBy": "_count",
                "size": "10"
              },
              "type": "terms"
            }
          ],
          "hide": false,
          "metrics": [
            {
              "$$hashKey": "object:52",
              "field": "even",
              "id": "1",
              "meta": {},
              "settings": {},
              "type": "count"
            }
          ],
          "query": "",
          "refId": "A",
          "timeField": "@timestamp"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Top 10 Client IPs",
      "type": "magnesium-wordcloud-panel"
    },
    {
      "cacheTimeout": null,
      "datasource": "$Elasticsearch",
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": "left",
            "filterable": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "string"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 2
      },
      "id": 38,
      "interval": null,
      "links": [],
      "maxDataPoints": 3,
      "options": {
        "series_index": 0,
        "wordCloudOptions": {
          "deterministic": true,
          "enableTooltip": true,
          "fontFamily": "arial",
          "fontSizes": [
            15,
            80
          ],
          "padding": 1,
          "rotationAngles": [
            0,
            0
          ],
          "rotations": 2,
          "scale": "sqrt",
          "spiral": "archimedean",
          "transitionDuration": 800
        }
      },
      "pluginVersion": "7.2.1",
      "targets": [
        {
          "alias": "",
          "bucketAggs": [
            {
              "$$hashKey": "object:54",
              "fake": true,
              "field": "dns.question.name",
              "id": "4",
              "settings": {
                "min_doc_count": "1",
                "order": "desc",
                "orderBy": "_count",
                "size": "10"
              },
              "type": "terms"
            }
          ],
          "hide": false,
          "metrics": [
            {
              "$$hashKey": "object:52",
              "field": "even",
              "id": "1",
              "meta": {},
              "settings": {},
              "type": "count"
            }
          ],
          "query": "",
          "refId": "A",
          "timeField": "@timestamp"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Top 10 URLs",
      "type": "magnesium-wordcloud-panel"
    },
    {
      "aliasColors": {},
      "bars": true,
      "cacheTimeout": null,
      "dashLength": 10,
      "dashes": false,
      "datasource": "$Elasticsearch",
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": "left",
            "filterable": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "string"
        },
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 21,
        "w": 12,
        "x": 0,
        "y": 10
      },
      "hiddenSeries": false,
      "id": 42,
      "interval": null,
      "legend": {
        "alignAsTable": true,
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "rightSide": false,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": false,
      "linewidth": 1,
      "links": [],
      "maxDataPoints": 3,
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "7.3.7",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": true,
      "steppedLine": false,
      "targets": [
        {
          "alias": "",
          "bucketAggs": [
            {
              "$$hashKey": "object:713",
              "fake": true,
              "field": "client.ip",
              "id": "6",
              "settings": {
                "min_doc_count": 0,
                "order": "desc",
                "orderBy": "_term",
                "size": "5"
              },
              "type": "terms"
            },
            {
              "$$hashKey": "object:710",
              "fake": true,
              "field": "dns.question.name",
              "id": "5",
              "settings": {
                "min_doc_count": "1",
                "order": "desc",
                "orderBy": "_count",
                "size": "5"
              },
              "type": "terms"
            },
            {
              "$$hashKey": "object:600",
              "fake": true,
              "field": "@timestamp",
              "id": "3",
              "settings": {
                "interval": "30s",
                "min_doc_count": 0,
                "trimEdges": 0
              },
              "type": "date_histogram"
            }
          ],
          "hide": false,
          "metrics": [
            {
              "$$hashKey": "object:701",
              "field": "select field",
              "id": "4",
              "type": "count"
            }
          ],
          "query": "",
          "refId": "A",
          "timeField": "@timestamp"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Network/Organization Name",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:490",
          "format": "string",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "$$hashKey": "object:491",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "cacheTimeout": null,
      "cards": {
        "cardHSpacing": 2,
        "cardMinWidth": 5,
        "cardRound": null,
        "cardVSpacing": 2
      },
      "color": {
        "cardColor": "#96D98D",
        "colorScale": "sqrt",
        "colorScheme": "interpolateRdYlGn",
        "defaultColor": "#757575",
        "exponent": 0.5,
        "mode": "opacity",
        "thresholds": []
      },
      "datasource": "$Elasticsearch",
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": "left",
            "filterable": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "string"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 21,
        "w": 12,
        "x": 12,
        "y": 10
      },
      "highlightCards": true,
      "id": 43,
      "interval": null,
      "legend": {
        "show": true
      },
      "links": [],
      "maxDataPoints": 3,
      "nullPointMode": "as empty",
      "pageSize": 15,
      "pluginVersion": "7.2.1",
      "seriesFilterIndex": -1,
      "statusmap": {
        "ConfigVersion": "v1"
      },
      "targets": [
        {
          "alias": "",
          "bucketAggs": [
            {
              "$$hashKey": "object:713",
              "fake": true,
              "field": "client.ip",
              "id": "6",
              "settings": {
                "min_doc_count": "1",
                "order": "desc",
                "orderBy": "_term",
                "size": "10"
              },
              "type": "terms"
            },
            {
              "$$hashKey": "object:600",
              "fake": true,
              "field": "@timestamp",
              "id": "3",
              "settings": {
                "interval": "30s",
                "min_doc_count": 0,
                "trimEdges": 0
              },
              "type": "date_histogram"
            }
          ],
          "hide": false,
          "metrics": [
            {
              "$$hashKey": "object:701",
              "field": "select field",
              "id": "4",
              "type": "count"
            }
          ],
          "query": "",
          "refId": "A",
          "timeField": "@timestamp"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Network/Organization Name",
      "tooltip": {
        "freezeOnClick": true,
        "items": [],
        "show": true,
        "showItems": false
      },
      "type": "flant-statusmap-panel",
      "useMax": true,
      "usingPagination": false,
      "xAxis": {
        "show": true
      },
      "yAxis": {
        "maxWidth": -1,
        "minWidth": -1,
        "show": true
      },
      "yAxisSort": "metrics"
    },
    {
      "datasource": "$Elasticsearch",
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": null,
            "displayMode": "color-text",
            "filterable": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "percentage",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 14,
        "w": 18,
        "x": 0,
        "y": 31
      },
      "id": 45,
      "options": {
        "showHeader": true,
        "sortBy": [
          {
            "desc": false,
            "displayName": "alert.category"
          }
        ]
      },
      "pluginVersion": "7.3.7",
      "targets": [
        {
          "alias": "",
          "bucketAggs": [
            {
              "$$hashKey": "object:7864",
              "field": "@timestamp",
              "id": "2",
              "settings": {
                "interval": "auto",
                "min_doc_count": 0,
                "trimEdges": 0
              },
              "type": "date_histogram"
            }
          ],
          "hide": false,
          "metrics": [
            {
              "$$hashKey": "object:7862",
              "field": "select metric",
              "id": "1",
              "meta": {},
              "pipelineAgg": "select metric",
              "pipelineVariables": [
                {
                  "name": "var1",
                  "pipelineAgg": "select metric"
                }
              ],
              "settings": {},
              "type": "logs"
            }
          ],
          "query": "",
          "refId": "A",
          "timeField": "@timestamp"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Discover",
      "transformations": [
        {
          "id": "filterFieldsByName",
          "options": {
            "include": {
              "names": [
                "@timestamp",
                "unbound.log.level",
                "unbound.client.ip",
                "unbound.dns.question.class",
                "unbound.dns.answers.type",
                "unbound.dns.question.name"
              ]
            }
          }
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {},
            "indexByName": {
              "@timestamp": 0,
              "unbound.client.ip": 2,
              "unbound.dns.answers.type": 4,
              "unbound.dns.question.class": 3,
              "unbound.log.level": 1
            },
            "renameByName": {}
          }
        }
      ],
      "type": "table"
    },
    {
      "aliasColors": {},
      "breakPoint": "50%",
      "cacheTimeout": null,
      "combine": {
        "label": "Others",
        "threshold": 0
      },
      "datasource": "$Elasticsearch",
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": "left",
            "filterable": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "string"
        },
        "overrides": []
      },
      "fontSize": "80%",
      "format": "short",
      "gridPos": {
        "h": 14,
        "w": 6,
        "x": 18,
        "y": 31
      },
      "id": 32,
      "interval": null,
      "legend": {
        "percentage": false,
        "show": true,
        "values": false
      },
      "legendType": "Under graph",
      "links": [],
      "maxDataPoints": 3,
      "nullPointMode": "connected",
      "pieType": "donut",
      "pluginVersion": "7.2.1",
      "strokeWidth": 1,
      "targets": [
        {
          "alias": "",
          "bucketAggs": [
            {
              "$$hashKey": "object:862",
              "fake": true,
              "field": "dns.answers.type",
              "id": "6",
              "settings": {
                "min_doc_count": "1",
                "order": "desc",
                "orderBy": "_count",
                "size": "10"
              },
              "type": "terms"
            },
            {
              "$$hashKey": "object:710",
              "fake": true,
              "field": "@timestamp",
              "id": "5",
              "settings": {
                "interval": "auto",
                "min_doc_count": 0,
                "trimEdges": 0
              },
              "type": "date_histogram"
            }
          ],
          "hide": false,
          "metrics": [
            {
              "$$hashKey": "object:701",
              "field": "select field",
              "id": "4",
              "type": "count"
            }
          ],
          "query": "",
          "refId": "A",
          "timeField": "@timestamp"
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Answer Type",
      "type": "grafana-piechart-panel",
      "valueName": "current"
    },
    {
      "aliasColors": {},
      "bars": true,
      "cacheTimeout": null,
      "dashLength": 10,
      "dashes": false,
      "datasource": "$Elasticsearch",
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": "left",
            "filterable": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "string"
        },
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 15,
        "w": 24,
        "x": 0,
        "y": 45
      },
      "hiddenSeries": false,
      "id": 35,
      "interval": null,
      "legend": {
        "alignAsTable": false,
        "avg": false,
        "current": false,
        "max": false,
        "min": false,
        "rightSide": true,
        "show": true,
        "total": false,
        "values": false
      },
      "lines": false,
      "linewidth": 1,
      "links": [],
      "maxDataPoints": 3,
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "7.3.7",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": true,
      "steppedLine": false,
      "targets": [
        {
          "alias": "",
          "bucketAggs": [
            {
              "$$hashKey": "object:713",
              "fake": true,
              "field": "client.ip",
              "id": "6",
              "settings": {
                "min_doc_count": "1",
                "order": "desc",
                "orderBy": "_term",
                "size": "15"
              },
              "type": "terms"
            },
            {
              "$$hashKey": "object:600",
              "fake": true,
              "field": "@timestamp",
              "id": "3",
              "settings": {
                "interval": "30s",
                "min_doc_count": 0,
                "trimEdges": 0
              },
              "type": "date_histogram"
            }
          ],
          "hide": false,
          "metrics": [
            {
              "$$hashKey": "object:701",
              "field": "select field",
              "id": "4",
              "type": "count"
            }
          ],
          "query": "",
          "refId": "A",
          "timeField": "@timestamp"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeRegions": [],
      "timeShift": null,
      "title": "Client IP/Time",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:490",
          "format": "string",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "$$hashKey": "object:491",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    }
  ],
  "refresh": false,
  "schemaVersion": 26,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "current": {
          "selected": false,
          "text": "",
          "value": ""
        },
        "error": null,
        "hide": 0,
        "includeAll": false,
        "label": null,
        "multi": false,
        "name": "Elasticsearch",
        "options": [],
        "query": "elasticsearch",
        "queryValue": "",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "type": "datasource"
      }
    ]
  },
  "time": {
    "from": "now-15m",
    "to": "now"
  },
  "timepicker": {},
  "timezone": "",
  "title": "OPNsense Firewall - Unbound",
  "uid": "TzwXEihMk",
  "version": 13,
  "description": "OPNsense Firewall"
}