Grafana dashboard: XARF Report Generator Example
Description: An example dashboard for the XARF Report Generator by IT-Hock

For more Informations please visit the GitHub Repository of the [XARF Report Generator](https://github.com/IT-Hock/xarf-report-generator)

{
  "__inputs": [
    {
      "name": "DS_INFLUXDB",
      "label": "InfluxDB",
      "description": "",
      "type": "datasource",
      "pluginId": "influxdb",
      "pluginName": "InfluxDB"
    }
  ],
  "__elements": [],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "8.4.6"
    },
    {
      "type": "datasource",
      "id": "influxdb",
      "name": "InfluxDB",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "piechart",
      "name": "Pie chart",
      "version": ""
    },
    {
      "type": "panel",
      "id": "table",
      "name": "Table",
      "version": ""
    },
    {
      "type": "panel",
      "id": "timeseries",
      "name": "Time series",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "target": {
          "limit": 100,
          "matchAny": false,
          "tags": [],
          "type": "dashboard"
        },
        "type": "dashboard"
      }
    ]
  },
  "description": "An example dashboard for the XARF Report Generator by IT-Hock",
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1649859407038,
  "links": [],
  "liveNow": false,
  "panels": [
    {
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds",
            "seriesBy": "last"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 23,
            "gradientMode": "hue",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "smooth",
            "lineStyle": {
              "fill": "solid"
            },
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "line+area"
            }
          },
          "decimals": 0,
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "dark-yellow",
                "value": 10
              },
              {
                "color": "dark-red",
                "value": 20
              }
            ]
          },
          "unit": "short"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 10,
        "w": 17,
        "x": 0,
        "y": 0
      },
      "hideTimeOverride": false,
      "id": 2,
      "interval": "5m",
      "options": {
        "legend": {
          "calcs": [
            "max",
            "last",
            "sum",
            "mean"
          ],
          "displayMode": "table",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "targets": [
        {
          "alias": "Failed Logins",
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB}"
          },
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "0"
              ],
              "type": "fill"
            }
          ],
          "measurement": "report",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT count(\"IPAddress\") FROM \"report\" WHERE $timeFilter GROUP BY time(1h) fill(0)",
          "rawQuery": false,
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "IPAddress"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "count"
              }
            ]
          ],
          "tags": [
            {
              "condition": "AND",
              "key": "host",
              "operator": "=~",
              "value": "/^$host$/"
            },
            {
              "condition": "AND",
              "key": "source_country",
              "operator": "=~",
              "value": "/^$country$/"
            }
          ]
        }
      ],
      "title": "Failed Logins",
      "type": "timeseries"
    },
    {
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            }
          },
          "mappings": [],
          "unit": "short"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 10,
        "w": 7,
        "x": 17,
        "y": 0
      },
      "id": 4,
      "interval": "1h",
      "options": {
        "legend": {
          "displayMode": "table",
          "placement": "right",
          "values": [
            "value",
            "percent"
          ]
        },
        "pieType": "pie",
        "reduceOptions": {
          "calcs": [
            "distinctCount"
          ],
          "fields": "",
          "values": true
        },
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "pluginVersion": "8.4.6",
      "targets": [
        {
          "alias": "$tag_source_country",
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB}"
          },
          "groupBy": [
            {
              "params": [
                "source_country"
              ],
              "type": "tag"
            }
          ],
          "measurement": "report",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "IP_Country"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "count"
              }
            ]
          ],
          "tags": [
            {
              "key": "host",
              "operator": "=~",
              "value": "/^$host$/"
            },
            {
              "condition": "AND",
              "key": "source_country",
              "operator": "=~",
              "value": "/^$country$/"
            }
          ]
        }
      ],
      "title": "Failed Logins by Country",
      "type": "piechart"
    },
    {
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "auto",
            "displayMode": "color-text",
            "filterable": true
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "text",
                "value": null
              }
            ]
          },
          "unit": "string"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Time"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 80
              },
              {
                "id": "unit",
                "value": "time: HH:mm:ss"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Country"
            },
            "properties": [
              {
                "id": "mappings",
                "value": [
                  {
                    "options": {
                      "AU": {
                        "index": 12,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/au.svg"
                      },
                      "CA": {
                        "index": 13,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/ca.svg"
                      },
                      "CN": {
                        "index": 0,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/cn.svg"
                      },
                      "DE": {
                        "index": 6,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/de.svg"
                      },
                      "FR": {
                        "index": 4,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/fr.svg"
                      },
                      "GB": {
                        "index": 5,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/gb.svg"
                      },
                      "IE": {
                        "index": 8,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/ie.svg"
                      },
                      "IN": {
                        "index": 7,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/in.svg"
                      },
                      "IR": {
                        "index": 11,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/ir.svg"
                      },
                      "KR": {
                        "index": 9,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/kr.svg"
                      },
                      "NL": {
                        "index": 10,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/nl.svg"
                      },
                      "RO": {
                        "index": 3,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/ro.svg"
                      },
                      "RU": {
                        "index": 2,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/ru.svg"
                      },
                      "US": {
                        "index": 1,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/us.svg"
                      }
                    },
                    "type": "value"
                  }
                ]
              },
              {
                "id": "custom.displayMode",
                "value": "image"
              },
              {
                "id": "custom.align",
                "value": "center"
              },
              {
                "id": "custom.width",
                "value": 90
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Date"
            },
            "properties": [
              {
                "id": "unit",
                "value": "time: DD.MM.YY"
              },
              {
                "id": "custom.width",
                "value": 80
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 12,
        "w": 6,
        "x": 0,
        "y": 10
      },
      "id": 10,
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "frameIndex": 0,
        "showHeader": true,
        "sortBy": []
      },
      "pluginVersion": "8.4.6",
      "targets": [
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB}"
          },
          "groupBy": [],
          "limit": "10",
          "measurement": "report",
          "orderByTime": "DESC",
          "policy": "default",
          "query": "SELECT \"IP_Country\" AS \"Country\", \"IP_ISP\" AS \"ISP\" FROM \"report\" WHERE (\"host\" =~ /^$host$/ AND \"source_country\" =~ /^$country$/ AND \"source\" = 'IPBan')  ORDER BY time DESC LIMIT 10 SLIMIT 10",
          "rawQuery": true,
          "refId": "A",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "IPAddress"
                ],
                "type": "field"
              },
              {
                "params": [
                  "IP Address"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "IP_ISP"
                ],
                "type": "field"
              },
              {
                "params": [
                  "ISP"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "IP_AbuseMail"
                ],
                "type": "field"
              },
              {
                "params": [
                  "Abuse Mail"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "IP_Country"
                ],
                "type": "field"
              },
              {
                "params": [
                  "Country"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "LogEntry"
                ],
                "type": "field"
              },
              {
                "params": [
                  "Log"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "Source"
                ],
                "type": "field"
              },
              {
                "params": [
                  "Source"
                ],
                "type": "alias"
              }
            ]
          ],
          "slimit": "10",
          "tags": [
            {
              "key": "host",
              "operator": "=~",
              "value": "/^$host$/"
            },
            {
              "condition": "AND",
              "key": "source",
              "operator": "=",
              "value": "IPBan"
            }
          ]
        }
      ],
      "title": "Latest IPBan Log Entries",
      "transformations": [
        {
          "id": "calculateField",
          "options": {
            "alias": "Date",
            "mode": "reduceRow",
            "reduce": {
              "include": [
                "Time"
              ],
              "reducer": "last"
            },
            "replaceFields": false
          }
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {},
            "indexByName": {
              "Country": 2,
              "Date": 0,
              "ISP": 3,
              "Time": 1
            },
            "renameByName": {}
          }
        }
      ],
      "type": "table"
    },
    {
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "auto",
            "displayMode": "color-text",
            "filterable": true
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "text",
                "value": null
              }
            ]
          },
          "unit": "string"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Time"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 80
              },
              {
                "id": "unit",
                "value": "time: HH:mm:ss"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Country"
            },
            "properties": [
              {
                "id": "mappings",
                "value": [
                  {
                    "options": {
                      "AU": {
                        "index": 12,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/au.svg"
                      },
                      "CA": {
                        "index": 13,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/ca.svg"
                      },
                      "CN": {
                        "index": 0,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/cn.svg"
                      },
                      "DE": {
                        "index": 6,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/de.svg"
                      },
                      "FR": {
                        "index": 4,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/fr.svg"
                      },
                      "GB": {
                        "index": 5,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/gb.svg"
                      },
                      "IE": {
                        "index": 8,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/ie.svg"
                      },
                      "IN": {
                        "index": 7,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/in.svg"
                      },
                      "IR": {
                        "index": 11,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/ir.svg"
                      },
                      "KR": {
                        "index": 9,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/kr.svg"
                      },
                      "NL": {
                        "index": 10,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/nl.svg"
                      },
                      "RO": {
                        "index": 3,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/ro.svg"
                      },
                      "RU": {
                        "index": 2,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/ru.svg"
                      },
                      "US": {
                        "index": 1,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/us.svg"
                      }
                    },
                    "type": "value"
                  }
                ]
              },
              {
                "id": "custom.displayMode",
                "value": "image"
              },
              {
                "id": "custom.align",
                "value": "center"
              },
              {
                "id": "custom.width",
                "value": 90
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Date"
            },
            "properties": [
              {
                "id": "unit",
                "value": "time: DD.MM.YY"
              },
              {
                "id": "custom.width",
                "value": 80
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 12,
        "w": 6,
        "x": 6,
        "y": 10
      },
      "id": 12,
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "frameIndex": 0,
        "showHeader": true,
        "sortBy": []
      },
      "pluginVersion": "8.4.6",
      "targets": [
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB}"
          },
          "groupBy": [],
          "limit": "10",
          "measurement": "report",
          "orderByTime": "DESC",
          "policy": "default",
          "query": "SELECT \"IP_Country\" AS \"Country\", \"IP_ISP\" AS \"ISP\" FROM \"report\" WHERE (\"host\" =~ /^$host$/ AND \"source_country\" =~ /^$country$/ AND \"source\" = 'IIS')  ORDER BY time DESC LIMIT 10 SLIMIT 10",
          "rawQuery": true,
          "refId": "A",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "IPAddress"
                ],
                "type": "field"
              },
              {
                "params": [
                  "IP Address"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "IP_ISP"
                ],
                "type": "field"
              },
              {
                "params": [
                  "ISP"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "IP_AbuseMail"
                ],
                "type": "field"
              },
              {
                "params": [
                  "Abuse Mail"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "IP_Country"
                ],
                "type": "field"
              },
              {
                "params": [
                  "Country"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "LogEntry"
                ],
                "type": "field"
              },
              {
                "params": [
                  "Log"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "Source"
                ],
                "type": "field"
              },
              {
                "params": [
                  "Source"
                ],
                "type": "alias"
              }
            ]
          ],
          "slimit": "10",
          "tags": [
            {
              "key": "host",
              "operator": "=~",
              "value": "/^$host$/"
            },
            {
              "condition": "AND",
              "key": "source",
              "operator": "=",
              "value": "IPBan"
            }
          ]
        }
      ],
      "title": "Latest IIS Log Entries",
      "transformations": [
        {
          "id": "calculateField",
          "options": {
            "alias": "Date",
            "mode": "reduceRow",
            "reduce": {
              "include": [
                "Time"
              ],
              "reducer": "last"
            },
            "replaceFields": false
          }
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {},
            "indexByName": {
              "Country": 2,
              "Date": 0,
              "ISP": 3,
              "Time": 1
            },
            "renameByName": {}
          }
        }
      ],
      "type": "table"
    },
    {
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "auto",
            "displayMode": "color-text",
            "filterable": true
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "text",
                "value": null
              }
            ]
          },
          "unit": "string"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Time"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 80
              },
              {
                "id": "unit",
                "value": "time: HH:mm:ss"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Country"
            },
            "properties": [
              {
                "id": "mappings",
                "value": [
                  {
                    "options": {
                      "AU": {
                        "index": 12,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/au.svg"
                      },
                      "CA": {
                        "index": 13,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/ca.svg"
                      },
                      "CN": {
                        "index": 0,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/cn.svg"
                      },
                      "DE": {
                        "index": 6,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/de.svg"
                      },
                      "FR": {
                        "index": 4,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/fr.svg"
                      },
                      "GB": {
                        "index": 5,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/gb.svg"
                      },
                      "IE": {
                        "index": 8,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/ie.svg"
                      },
                      "IN": {
                        "index": 7,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/in.svg"
                      },
                      "IR": {
                        "index": 11,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/ir.svg"
                      },
                      "KR": {
                        "index": 9,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/kr.svg"
                      },
                      "NG": {
                        "index": 15,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/ng.svg"
                      },
                      "NL": {
                        "index": 10,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/nl.svg"
                      },
                      "PK": {
                        "index": 16,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/pk.svg"
                      },
                      "RO": {
                        "index": 3,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/ro.svg"
                      },
                      "RU": {
                        "index": 2,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/ru.svg"
                      },
                      "SG": {
                        "index": 14,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/sg.svg"
                      },
                      "US": {
                        "index": 1,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/us.svg"
                      }
                    },
                    "type": "value"
                  }
                ]
              },
              {
                "id": "custom.displayMode",
                "value": "image"
              },
              {
                "id": "custom.align",
                "value": "center"
              },
              {
                "id": "custom.width",
                "value": 90
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Date"
            },
            "properties": [
              {
                "id": "unit",
                "value": "time: DD.MM.YY"
              },
              {
                "id": "custom.width",
                "value": 80
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 12,
        "w": 6,
        "x": 12,
        "y": 10
      },
      "id": 13,
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "frameIndex": 0,
        "showHeader": true,
        "sortBy": []
      },
      "pluginVersion": "8.4.6",
      "targets": [
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB}"
          },
          "groupBy": [],
          "limit": "10",
          "measurement": "report",
          "orderByTime": "DESC",
          "policy": "default",
          "query": "SELECT \"IP_Country\" AS \"Country\", \"IP_ISP\" AS \"ISP\" FROM \"report\" WHERE (\"host\" =~ /^$host$/ AND \"source_country\" =~ /^$country$/ AND \"source\" = 'nginx')  ORDER BY time DESC LIMIT 10 SLIMIT 10",
          "rawQuery": true,
          "refId": "A",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "IPAddress"
                ],
                "type": "field"
              },
              {
                "params": [
                  "IP Address"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "IP_ISP"
                ],
                "type": "field"
              },
              {
                "params": [
                  "ISP"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "IP_AbuseMail"
                ],
                "type": "field"
              },
              {
                "params": [
                  "Abuse Mail"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "IP_Country"
                ],
                "type": "field"
              },
              {
                "params": [
                  "Country"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "LogEntry"
                ],
                "type": "field"
              },
              {
                "params": [
                  "Log"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "Source"
                ],
                "type": "field"
              },
              {
                "params": [
                  "Source"
                ],
                "type": "alias"
              }
            ]
          ],
          "slimit": "10",
          "tags": [
            {
              "key": "host",
              "operator": "=~",
              "value": "/^$host$/"
            },
            {
              "condition": "AND",
              "key": "source",
              "operator": "=",
              "value": "IPBan"
            }
          ]
        }
      ],
      "title": "Latest nginx Log Entries",
      "transformations": [
        {
          "id": "calculateField",
          "options": {
            "alias": "Date",
            "mode": "reduceRow",
            "reduce": {
              "include": [
                "Time"
              ],
              "reducer": "last"
            },
            "replaceFields": false
          }
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {},
            "indexByName": {
              "Country": 2,
              "Date": 0,
              "ISP": 3,
              "Time": 1
            },
            "renameByName": {}
          }
        }
      ],
      "type": "table"
    },
    {
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "auto",
            "displayMode": "color-text",
            "filterable": true
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "text",
                "value": null
              }
            ]
          },
          "unit": "string"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Time"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 80
              },
              {
                "id": "unit",
                "value": "time: HH:mm:ss"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Country"
            },
            "properties": [
              {
                "id": "mappings",
                "value": [
                  {
                    "options": {
                      "AU": {
                        "index": 12,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/au.svg"
                      },
                      "CA": {
                        "index": 13,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/ca.svg"
                      },
                      "CN": {
                        "index": 0,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/cn.svg"
                      },
                      "DE": {
                        "index": 6,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/de.svg"
                      },
                      "FR": {
                        "index": 4,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/fr.svg"
                      },
                      "GB": {
                        "index": 5,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/gb.svg"
                      },
                      "IE": {
                        "index": 8,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/ie.svg"
                      },
                      "IN": {
                        "index": 7,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/in.svg"
                      },
                      "IR": {
                        "index": 11,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/ir.svg"
                      },
                      "KR": {
                        "index": 9,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/kr.svg"
                      },
                      "NL": {
                        "index": 10,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/nl.svg"
                      },
                      "RO": {
                        "index": 3,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/ro.svg"
                      },
                      "RU": {
                        "index": 2,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/ru.svg"
                      },
                      "US": {
                        "index": 1,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/us.svg"
                      }
                    },
                    "type": "value"
                  }
                ]
              },
              {
                "id": "custom.displayMode",
                "value": "image"
              },
              {
                "id": "custom.align",
                "value": "center"
              },
              {
                "id": "custom.width",
                "value": 90
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Date"
            },
            "properties": [
              {
                "id": "unit",
                "value": "time: DD.MM.YY"
              },
              {
                "id": "custom.width",
                "value": 80
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 12,
        "w": 6,
        "x": 18,
        "y": 10
      },
      "id": 11,
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "frameIndex": 0,
        "showHeader": true,
        "sortBy": []
      },
      "pluginVersion": "8.4.6",
      "targets": [
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB}"
          },
          "groupBy": [],
          "limit": "10",
          "measurement": "report",
          "orderByTime": "DESC",
          "policy": "default",
          "query": "SELECT \"IP_Country\" AS \"Country\", \"IP_ISP\" AS \"ISP\" FROM \"report\" WHERE (\"host\" =~ /^$host$/ AND \"source_country\" =~ /^$country$/ AND \"source\" = 'EventViewer')  ORDER BY time DESC LIMIT 10 SLIMIT 10",
          "rawQuery": true,
          "refId": "A",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "IPAddress"
                ],
                "type": "field"
              },
              {
                "params": [
                  "IP Address"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "IP_ISP"
                ],
                "type": "field"
              },
              {
                "params": [
                  "ISP"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "IP_AbuseMail"
                ],
                "type": "field"
              },
              {
                "params": [
                  "Abuse Mail"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "IP_Country"
                ],
                "type": "field"
              },
              {
                "params": [
                  "Country"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "LogEntry"
                ],
                "type": "field"
              },
              {
                "params": [
                  "Log"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "Source"
                ],
                "type": "field"
              },
              {
                "params": [
                  "Source"
                ],
                "type": "alias"
              }
            ]
          ],
          "slimit": "10",
          "tags": [
            {
              "key": "host",
              "operator": "=~",
              "value": "/^$host$/"
            },
            {
              "condition": "AND",
              "key": "source",
              "operator": "=",
              "value": "IPBan"
            }
          ]
        }
      ],
      "title": "Latest EventViewer Log Entries",
      "transformations": [
        {
          "id": "calculateField",
          "options": {
            "alias": "Date",
            "mode": "reduceRow",
            "reduce": {
              "include": [
                "Time"
              ],
              "reducer": "last"
            },
            "replaceFields": false
          }
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {},
            "indexByName": {
              "Country": 2,
              "Date": 0,
              "ISP": 3,
              "Time": 1
            },
            "renameByName": {}
          }
        }
      ],
      "type": "table"
    },
    {
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "auto",
            "displayMode": "color-text",
            "filterable": true
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "text",
                "value": null
              }
            ]
          },
          "unit": "string"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Country"
            },
            "properties": [
              {
                "id": "mappings",
                "value": [
                  {
                    "options": {
                      "AU": {
                        "index": 12,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/au.svg"
                      },
                      "CA": {
                        "index": 13,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/ca.svg"
                      },
                      "CN": {
                        "index": 0,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/cn.svg"
                      },
                      "DE": {
                        "index": 6,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/de.svg"
                      },
                      "FR": {
                        "index": 4,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/fr.svg"
                      },
                      "GB": {
                        "index": 5,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/gb.svg"
                      },
                      "IE": {
                        "index": 8,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/ie.svg"
                      },
                      "IN": {
                        "index": 7,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/in.svg"
                      },
                      "IR": {
                        "index": 11,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/ir.svg"
                      },
                      "KR": {
                        "index": 9,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/kr.svg"
                      },
                      "NL": {
                        "index": 10,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/nl.svg"
                      },
                      "RO": {
                        "index": 3,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/ro.svg"
                      },
                      "RU": {
                        "index": 2,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/ru.svg"
                      },
                      "SG": {
                        "index": 14,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/sg.svg"
                      },
                      "US": {
                        "index": 1,
                        "text": "https://raw.githubusercontent.com/lipis/flag-icons/main/flags/1x1/us.svg"
                      }
                    },
                    "type": "value"
                  }
                ]
              },
              {
                "id": "custom.displayMode",
                "value": "image"
              },
              {
                "id": "custom.width",
                "value": 90
              },
              {
                "id": "custom.align",
                "value": "center"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Abuse Mail"
            },
            "properties": [
              {
                "id": "mappings",
                "value": [
                  {
                    "options": {
                      "match": "empty",
                      "result": {
                        "color": "dark-red",
                        "index": 0,
                        "text": "No Abuse Mail found!"
                      }
                    },
                    "type": "special"
                  }
                ]
              },
              {
                "id": "custom.width",
                "value": 168
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Source"
            },
            "properties": [
              {
                "id": "mappings",
                "value": [
                  {
                    "options": {
                      "EventViewer": {
                        "color": "dark-blue",
                        "index": 0
                      },
                      "IPBan": {
                        "color": "dark-orange",
                        "index": 2
                      },
                      "nginx": {
                        "color": "dark-green",
                        "index": 1
                      }
                    },
                    "type": "value"
                  }
                ]
              },
              {
                "id": "custom.width",
                "value": 108
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "ISP"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 228
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "IP Address"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 151
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Log"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 905
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Time"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 185
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 11,
        "w": 24,
        "x": 0,
        "y": 22
      },
      "id": 6,
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "frameIndex": 0,
        "showHeader": true,
        "sortBy": []
      },
      "pluginVersion": "8.4.6",
      "targets": [
        {
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_INFLUXDB}"
          },
          "groupBy": [],
          "limit": "10",
          "measurement": "report",
          "orderByTime": "DESC",
          "policy": "default",
          "query": "SELECT \"IP_Country\" AS \"Country\", \"IPAddress\" AS \"IP Address\", \"IP_ISP\" AS \"ISP\", \"IP_AbuseMail\" AS \"Abuse Mail\", \"LogEntry\" AS \"Log\", \"Source\" AS \"Source\" FROM \"report\" WHERE (\"host\" =~ /^$host$/ AND \"source_country\" =~ /^$country$/) ORDER BY time DESC LIMIT 10 SLIMIT 10",
          "rawQuery": true,
          "refId": "A",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "IPAddress"
                ],
                "type": "field"
              },
              {
                "params": [
                  "IP Address"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "IP_ISP"
                ],
                "type": "field"
              },
              {
                "params": [
                  "ISP"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "IP_AbuseMail"
                ],
                "type": "field"
              },
              {
                "params": [
                  "Abuse Mail"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "IP_Country"
                ],
                "type": "field"
              },
              {
                "params": [
                  "Country"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "LogEntry"
                ],
                "type": "field"
              },
              {
                "params": [
                  "Log"
                ],
                "type": "alias"
              }
            ],
            [
              {
                "params": [
                  "Source"
                ],
                "type": "field"
              },
              {
                "params": [
                  "Source"
                ],
                "type": "alias"
              }
            ]
          ],
          "slimit": "10",
          "tags": [
            {
              "key": "host",
              "operator": "=~",
              "value": "/^$host$/"
            }
          ]
        }
      ],
      "title": "Latest Log Entries",
      "type": "table"
    }
  ],
  "refresh": false,
  "schemaVersion": 35,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "current": {},
        "definition": "SHOW TAG VALUES  WITH KEY = \"host\"",
        "hide": 0,
        "includeAll": false,
        "multi": false,
        "name": "host",
        "options": [],
        "query": "SHOW TAG VALUES  WITH KEY = \"host\"",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "type": "query",
        "datasource": "${DS_INFLUXDB}"
      },
      {
        "current": {},
        "definition": "SHOW TAG VALUES  WITH KEY = \"source_country\"",
        "hide": 0,
        "includeAll": true,
        "multi": true,
        "name": "country",
        "options": [],
        "query": "SHOW TAG VALUES  WITH KEY = \"source_country\"",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "type": "query",
        "datasource": "${DS_INFLUXDB}"
      }
    ]
  },
  "time": {
    "from": "now-6h",
    "to": "now"
  },
  "timepicker": {},
  "timezone": "",
  "title": "XARF Report Generator Example",
  "uid": "dv57Ox8nk",
  "version": 56,
  "weekStart": "",
  "gnetId": 16097
}