AWS WAFv2 Stats
Dashboard with statistics from AWS WAFv2 via CloudWatch Logs Insights queries
Dashboard heavily inspired by this [article](https://aws.amazon.com/blogs/security/deploy-dashboard-for-aws-waf-minimal-effort/)

Uses the geomap panel so a fairly recent version of Grafana is needed. Not tested with any version besides 9.4.x though it should work with any 9.x

Couldn't find any other AWS WAFv2 dashboards on this site so I decided to build mine. Hope you enjoy it.

It uses CloudWatch Logs Insights for the queries so make sure to enable logging for your WebACL
{
  "__inputs": [],
  "__elements": {},
  "__requires": [
    {
      "type": "panel",
      "id": "barchart",
      "name": "Bar chart",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "cloudwatch",
      "name": "CloudWatch",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "gauge",
      "name": "Gauge",
      "version": ""
    },
    {
      "type": "panel",
      "id": "geomap",
      "name": "Geomap",
      "version": ""
    },
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "9.3.0"
    },
    {
      "type": "panel",
      "id": "piechart",
      "name": "Pie chart",
      "version": ""
    },
    {
      "type": "panel",
      "id": "table",
      "name": "Table",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": {
          "type": "grafana",
          "uid": "-- Grafana --"
        },
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "target": {
          "limit": 100,
          "matchAny": false,
          "tags": [],
          "type": "dashboard"
        },
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 0,
  "id": null,
  "links": [],
  "liveNow": false,
  "panels": [
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 10,
      "panels": [],
      "title": "Stats",
      "type": "row"
    },
    {
      "datasource": {
        "type": "cloudwatch",
        "uid": "$datasource"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 16,
        "w": 12,
        "x": 0,
        "y": 1
      },
      "id": 1,
      "options": {
        "basemap": {
          "config": {},
          "name": "Layer 0",
          "type": "default"
        },
        "controls": {
          "mouseWheelZoom": true,
          "showAttribution": false,
          "showDebug": false,
          "showMeasure": false,
          "showScale": false,
          "showZoom": true
        },
        "layers": [
          {
            "config": {
              "blur": 14,
              "radius": 13,
              "weight": {
                "field": "requestCount",
                "fixed": 1,
                "max": 1,
                "min": 0
              }
            },
            "filterData": {
              "id": "byRefId",
              "options": "A"
            },
            "location": {
              "lookup": "httpRequest.country",
              "mode": "lookup"
            },
            "name": "Layer 1",
            "opacity": 0.9,
            "tooltip": true,
            "type": "heatmap"
          }
        ],
        "tooltip": {
          "mode": "details"
        },
        "view": {
          "allLayers": false,
          "id": "coords",
          "lastOnly": false,
          "lat": 28.969693,
          "layer": "Layer 1",
          "lon": -19.204411,
          "zoom": 2.23
        }
      },
      "pluginVersion": "9.4.7",
      "targets": [
        {
          "datasource": {
            "type": "cloudwatch",
            "uid": "$datasource"
          },
          "dimensions": {},
          "expression": "fields httpRequest.country |\n stats count(*) as requestCount by httpRequest.country",
          "id": "",
          "key": "Q-df0ce818-94a9-4a9c-81be-711d88ecee8f-0",
          "label": "",
          "logGroups": [
            {
              "arn": "$log_group",
              "name": "$log_group"
            }
          ],
          "matchExact": true,
          "metricEditorMode": 0,
          "metricName": "",
          "metricQueryType": 0,
          "namespace": "",
          "period": "",
          "queryMode": "Logs",
          "refId": "A",
          "region": "$region",
          "sqlExpression": "",
          "statistic": "Average",
          "statsGroups": [
            "httpRequest.country"
          ]
        }
      ],
      "title": "Requests by Country",
      "type": "geomap"
    },
    {
      "datasource": {
        "type": "cloudwatch",
        "uid": "$datasource"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "auto",
            "cellOptions": {
              "mode": "gradient",
              "type": "gauge"
            },
            "inspect": false,
            "minWidth": 50
          },
          "displayName": "Requests",
          "mappings": [],
          "thresholds": {
            "mode": "percentage",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 30
              },
              {
                "color": "dark-red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "httpRequest.country"
            },
            "properties": [
              {
                "id": "custom.cellOptions",
                "value": {
                  "type": "auto"
                }
              },
              {
                "id": "displayName",
                "value": "Country"
              },
              {
                "id": "custom.width",
                "value": 40
              },
              {
                "id": "links"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 8,
        "w": 9,
        "x": 12,
        "y": 1
      },
      "id": 3,
      "options": {
        "footer": {
          "countRows": false,
          "enablePagination": false,
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "showHeader": false,
        "sortBy": [
          {
            "desc": true,
            "displayName": "Requests"
          }
        ]
      },
      "pluginVersion": "9.4.7",
      "targets": [
        {
          "datasource": {
            "type": "cloudwatch",
            "uid": "$datasource"
          },
          "dimensions": {},
          "expression": "fields httpRequest.country |\n stats count(*) as num_requests by httpRequest.country",
          "id": "",
          "key": "Q-df0ce818-94a9-4a9c-81be-711d88ecee8f-0",
          "label": "",
          "logGroups": [
            {
              "arn": "$log_group",
              "name": "$log_group"
            }
          ],
          "matchExact": true,
          "metricEditorMode": 0,
          "metricName": "",
          "metricQueryType": 0,
          "namespace": "",
          "period": "",
          "queryMode": "Logs",
          "refId": "A",
          "region": "$region",
          "sqlExpression": "",
          "statistic": "Average",
          "statsGroups": [
            "httpRequest.country"
          ]
        }
      ],
      "title": "Requests by Country",
      "type": "table"
    },
    {
      "datasource": {
        "type": "cloudwatch",
        "uid": "$datasource"
      },
      "fieldConfig": {
        "defaults": {
          "mappings": [],
          "min": 0,
          "thresholds": {
            "mode": "percentage",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 30
              },
              {
                "color": "dark-red",
                "value": 50
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "A total"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Total"
              },
              {
                "id": "thresholds",
                "value": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "green",
                      "value": null
                    }
                  ]
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "B blocked"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Blocked"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 8,
        "w": 5,
        "x": 12,
        "y": 9
      },
      "id": 7,
      "options": {
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "/.*/",
          "values": false
        },
        "showThresholdLabels": false,
        "showThresholdMarkers": true
      },
      "pluginVersion": "9.4.7",
      "targets": [
        {
          "datasource": {
            "type": "cloudwatch",
            "uid": "$datasource"
          },
          "dimensions": {},
          "expression": "fields @message |\n stats count(*) as total",
          "id": "",
          "label": "",
          "logGroups": [
            {
              "arn": "$log_group",
              "name": "$log_group"
            }
          ],
          "matchExact": true,
          "metricEditorMode": 0,
          "metricName": "",
          "metricQueryType": 0,
          "namespace": "",
          "period": "",
          "queryMode": "Logs",
          "refId": "A",
          "region": "$region",
          "sqlExpression": "",
          "statistic": "Average",
          "statsGroups": []
        },
        {
          "datasource": {
            "type": "cloudwatch",
            "uid": "$datasource"
          },
          "dimensions": {},
          "expression": "fields action |\n filter action like \"BLOCK\" |\n stats count(*) as blocked",
          "hide": false,
          "id": "",
          "label": "",
          "logGroups": [
            {
              "arn": "$log_group",
              "name": "$log_group"
            }
          ],
          "matchExact": true,
          "metricEditorMode": 0,
          "metricName": "",
          "metricQueryType": 0,
          "namespace": "",
          "period": "",
          "queryMode": "Logs",
          "refId": "B",
          "region": "$region",
          "sqlExpression": "",
          "statistic": "Average",
          "statsGroups": []
        }
      ],
      "title": "Requests",
      "transformations": [],
      "type": "gauge"
    },
    {
      "datasource": {
        "type": "cloudwatch",
        "uid": "$datasource"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            }
          },
          "mappings": []
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 4,
        "x": 17,
        "y": 9
      },
      "id": 2,
      "options": {
        "legend": {
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "pieType": "pie",
        "reduceOptions": {
          "calcs": [
            "sum"
          ],
          "fields": "/^num_requests$/",
          "values": true
        },
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "pluginVersion": "9.4.7",
      "targets": [
        {
          "datasource": {
            "type": "cloudwatch",
            "uid": "$datasource"
          },
          "dimensions": {},
          "expression": "fields httpRequest.country |\n stats count(*) as num_requests by httpRequest.country",
          "id": "",
          "key": "Q-df0ce818-94a9-4a9c-81be-711d88ecee8f-0",
          "label": "",
          "logGroups": [
            {
              "arn": "$log_group",
              "name": "$log_group"
            }
          ],
          "matchExact": true,
          "metricEditorMode": 0,
          "metricName": "",
          "metricQueryType": 0,
          "namespace": "",
          "period": "",
          "queryMode": "Logs",
          "refId": "A",
          "region": "$region",
          "sqlExpression": "",
          "statistic": "Average",
          "statsGroups": [
            "httpRequest.country"
          ]
        }
      ],
      "title": "Requests by Country",
      "type": "piechart"
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 17
      },
      "id": 12,
      "panels": [],
      "title": "Top 10",
      "type": "row"
    },
    {
      "datasource": {
        "type": "cloudwatch",
        "uid": "$datasource"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "fillOpacity": 80,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineWidth": 1,
            "scaleDistribution": {
              "type": "linear"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "short"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 12,
        "w": 4,
        "x": 0,
        "y": 18
      },
      "id": 16,
      "options": {
        "barRadius": 0,
        "barWidth": 0.97,
        "fullHighlight": false,
        "groupWidth": 0.7,
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "right",
          "showLegend": false
        },
        "orientation": "horizontal",
        "showValue": "never",
        "stacking": "none",
        "tooltip": {
          "mode": "single",
          "sort": "none"
        },
        "xTickLabelRotation": 0,
        "xTickLabelSpacing": 0
      },
      "pluginVersion": "9.4.7",
      "targets": [
        {
          "datasource": {
            "type": "cloudwatch",
            "uid": "$datasource"
          },
          "dimensions": {},
          "expression": "fields httpRequest.clientIp\n| stats count(*) as requestCount by httpRequest.clientIp\n| sort requestCount desc\n| limit 10",
          "id": "",
          "label": "",
          "logGroups": [
            {
              "arn": "$log_group",
              "name": "$log_group"
            }
          ],
          "matchExact": true,
          "metricEditorMode": 0,
          "metricName": "",
          "metricQueryType": 0,
          "namespace": "",
          "period": "",
          "queryMode": "Logs",
          "refId": "A",
          "region": "$region",
          "sqlExpression": "",
          "statistic": "Average",
          "statsGroups": [
            "httpRequest.clientIp"
          ]
        }
      ],
      "title": "Client IPs",
      "transparent": true,
      "type": "barchart"
    },
    {
      "datasource": {
        "type": "cloudwatch",
        "uid": "$datasource"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "left",
            "cellOptions": {
              "type": "auto"
            },
            "filterable": false,
            "inspect": false
          },
          "mappings": [],
          "noValue": "N/A",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "short"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "requestCount"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 90
              },
              {
                "id": "links"
              },
              {
                "id": "custom.align",
                "value": "auto"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "userAgent"
            },
            "properties": [
              {
                "id": "links"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 12,
        "w": 9,
        "x": 4,
        "y": 18
      },
      "id": 17,
      "options": {
        "footer": {
          "countRows": false,
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "showHeader": false
      },
      "pluginVersion": "9.4.7",
      "targets": [
        {
          "datasource": {
            "type": "cloudwatch",
            "uid": "$datasource"
          },
          "dimensions": {},
          "expression": "fields @timestamp, @message\n| parse @message '{\"name\":\"User-Agent\",\"value\":\"*\"}' as userAgent\n| stats count(*) as requestCount by userAgent\n| sort requestCount desc\n| limit 10",
          "id": "",
          "label": "",
          "logGroups": [
            {
              "arn": "$log_group",
              "name": "$log_group"
            }
          ],
          "matchExact": true,
          "metricEditorMode": 0,
          "metricName": "",
          "metricQueryType": 0,
          "namespace": "",
          "period": "",
          "queryMode": "Logs",
          "refId": "A",
          "region": "$region",
          "sqlExpression": "",
          "statistic": "Average",
          "statsGroups": [
            "userAgent"
          ]
        }
      ],
      "title": "User Agents",
      "transparent": true,
      "type": "table"
    },
    {
      "datasource": {
        "type": "cloudwatch",
        "uid": "$datasource"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "left",
            "cellOptions": {
              "type": "auto"
            },
            "filterable": false,
            "inspect": false
          },
          "mappings": [],
          "noValue": "N/A",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "short"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "requestCount"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 90
              },
              {
                "id": "links"
              },
              {
                "id": "custom.align",
                "value": "auto"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "host"
            },
            "properties": [
              {
                "id": "links"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 12,
        "w": 4,
        "x": 13,
        "y": 18
      },
      "id": 18,
      "options": {
        "footer": {
          "countRows": false,
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "showHeader": false
      },
      "pluginVersion": "9.4.7",
      "targets": [
        {
          "datasource": {
            "type": "cloudwatch",
            "uid": "$datasource"
          },
          "dimensions": {},
          "expression": "fields @timestamp, @message\n| parse @message '{\"name\":\"Host\",\"value\":\"*\"}' as host\n| stats count(*) as requestCount by host\n| sort requestCount desc\n| limit 10",
          "id": "",
          "label": "",
          "logGroups": [
            {
              "arn": "$log_group",
              "name": "$log_group"
            }
          ],
          "matchExact": true,
          "metricEditorMode": 0,
          "metricName": "",
          "metricQueryType": 0,
          "namespace": "",
          "period": "",
          "queryMode": "Logs",
          "refId": "A",
          "region": "$region",
          "sqlExpression": "",
          "statistic": "Average",
          "statsGroups": [
            "host"
          ]
        }
      ],
      "title": "Hosts",
      "transparent": true,
      "type": "table"
    },
    {
      "datasource": {
        "type": "cloudwatch",
        "uid": "$datasource"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            }
          },
          "mappings": []
        },
        "overrides": []
      },
      "gridPos": {
        "h": 12,
        "w": 4,
        "x": 17,
        "y": 18
      },
      "id": 5,
      "options": {
        "displayLabels": [
          "percent"
        ],
        "legend": {
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true,
          "values": [
            "value"
          ]
        },
        "pieType": "donut",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": true
        },
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "cloudwatch",
            "uid": "$datasource"
          },
          "dimensions": {},
          "expression": "fields terminatingRuleId |\n  stats count(*) as num by terminatingRuleId |\n  limit 10",
          "id": "",
          "label": "",
          "logGroups": [
            {
              "arn": "$log_group",
              "name": "$log_group"
            }
          ],
          "matchExact": true,
          "metricEditorMode": 0,
          "metricName": "",
          "metricQueryType": 0,
          "namespace": "",
          "period": "",
          "queryMode": "Logs",
          "refId": "A",
          "region": "$region",
          "sqlExpression": "",
          "statistic": "Average",
          "statsGroups": [
            "terminatingRuleId"
          ]
        }
      ],
      "title": "Terminating Rule",
      "transparent": true,
      "type": "piechart"
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 30
      },
      "id": 14,
      "panels": [],
      "title": "Logs",
      "type": "row"
    },
    {
      "datasource": {
        "type": "cloudwatch",
        "uid": "$datasource"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "auto",
            "cellOptions": {
              "type": "auto"
            },
            "inspect": true
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green"
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "@message"
            },
            "properties": [
              {
                "id": "custom.cellOptions",
                "value": {
                  "type": "json-view"
                }
              },
              {
                "id": "custom.inspect",
                "value": true
              },
              {
                "id": "links"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Time"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 200
              },
              {
                "id": "links"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "httpSourceId"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 291
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "webaclId"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 243
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "headers"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 412
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "country"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 97
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "uri"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 196
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "args"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 101
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "httpVersion"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 138
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "httpMethod"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 164
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "clientIp"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 194
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "action"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 103
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "httpRequest"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 193
              },
              {
                "id": "custom.hidden",
                "value": true
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 20,
        "w": 21,
        "x": 0,
        "y": 31
      },
      "id": 20,
      "options": {
        "footer": {
          "countRows": false,
          "enablePagination": true,
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "showHeader": true,
        "sortBy": [
          {
            "desc": true,
            "displayName": "action"
          }
        ]
      },
      "pluginVersion": "9.4.7",
      "targets": [
        {
          "datasource": {
            "type": "cloudwatch",
            "uid": "$datasource"
          },
          "dimensions": {},
          "expression": "fields @message",
          "id": "",
          "label": "",
          "logGroups": [
            {
              "arn": "$log_group",
              "name": "$log_group"
            }
          ],
          "matchExact": true,
          "metricEditorMode": 0,
          "metricName": "",
          "metricQueryType": 0,
          "namespace": "",
          "period": "",
          "queryMode": "Logs",
          "refId": "A",
          "region": "$region",
          "sqlExpression": "",
          "statistic": "Average",
          "statsGroups": []
        }
      ],
      "title": "HTTP Request",
      "transformations": [
        {
          "id": "extractFields",
          "options": {
            "format": "json",
            "jsonPaths": [
              {
                "path": "action"
              },
              {
                "path": "httpRequest"
              },
              {
                "path": "terminatingRuleId"
              }
            ],
            "keepTime": true,
            "replace": true,
            "source": "@message"
          }
        },
        {
          "id": "extractFields",
          "options": {
            "format": "json",
            "keepTime": false,
            "replace": false,
            "source": "httpRequest"
          }
        }
      ],
      "type": "table"
    }
  ],
  "refresh": "",
  "revision": 1,
  "schemaVersion": 38,
  "style": "dark",
  "tags": [
    "aws",
    "waf",
    "wafv2",
    "cloudwatch"
  ],
  "templating": {
    "list": [
      {
        "current": {
          "selected": false,
          "text": "CloudWatch Production",
          "value": "CloudWatch Production"
        },
        "hide": 0,
        "includeAll": false,
        "multi": false,
        "name": "datasource",
        "options": [],
        "query": "cloudwatch",
        "queryValue": "",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "type": "datasource"
      },
      {
        "current": {},
        "datasource": {
          "type": "cloudwatch",
          "uid": "$datasource"
        },
        "definition": "",
        "hide": 0,
        "includeAll": false,
        "multi": false,
        "name": "region",
        "options": [],
        "query": {
          "queryType": "regions",
          "refId": "CloudWatchVariableQueryEditor-VariableQuery",
          "region": "$region"
        },
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "type": "query"
      },
      {
        "current": {},
        "datasource": {
          "type": "cloudwatch",
          "uid": "$datasource"
        },
        "definition": "",
        "hide": 0,
        "includeAll": false,
        "multi": false,
        "name": "log_group",
        "options": [],
        "query": {
          "logGroupPrefix": "aws-waf-logs-",
          "queryType": "logGroups",
          "refId": "CloudWatchVariableQueryEditor-VariableQuery",
          "region": "$region"
        },
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "type": "query"
      }
    ]
  },
  "time": {
    "from": "now-30m",
    "to": "now"
  },
  "timepicker": {},
  "timezone": "",
  "title": "AWS WAFv2 Stats",
  "uid": "EjsIYEBVz",
  "version": 43,
  "weekStart": "",
  "gnetId": 18380,
  "description": "Dashboard with statistics from AWS WAFv2 via CloudWatch Logs Insights queries"
}