Grafana dashboard: NGINX LOGS & GEO MAP
Description: Nginx Logs and GEO map


{
  "__inputs": [
    {
      "name": "DS_TELEGRAF",
      "label": "Telegraf",
      "description": "",
      "type": "datasource",
      "pluginId": "influxdb",
      "pluginName": "InfluxDB"
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "7.3.6"
    },
    {
      "type": "panel",
      "id": "grafana-worldmap-panel",
      "name": "Worldmap Panel",
      "version": "0.3.2"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "influxdb",
      "name": "InfluxDB",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "stat",
      "name": "Stat",
      "version": ""
    },
    {
      "type": "panel",
      "id": "table",
      "name": "Table",
      "version": ""
    },
    {
      "type": "panel",
      "id": "table-old",
      "name": "Table (old)",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "$$hashKey": "object:712",
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "description": "Nginx Logs and GEO map",
  "editable": true,
  "gnetId": 17376,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1611407563785,
  "links": [
    {
      "$$hashKey": "object:17709",
      "icon": "external link",
      "tags": [],
      "targetBlank": true,
      "title": "Geoip2Influx",
      "type": "link",
      "url": "https://github.com/gilbN/lsio-docker-mods/tree/master/letsencrypt/geoip2-nginx-stats"
    }
  ],
  "panels": [
    {
      "collapsed": false,
      "datasource": "${DS_TELEGRAF}",
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 8,
      "panels": [],
      "title": "GEO MAP",
      "type": "row"
    },
    {
      "circleMaxSize": "20",
      "circleMinSize": 2,
      "colors": [
        "#56A64B",
        "rgba(237, 129, 40, 0.89)",
        "rgba(245, 54, 54, 0.9)"
      ],
      "datasource": "$datasource",
      "decimals": 0,
      "esMetric": "Count",
      "fieldConfig": {
        "defaults": {
          "custom": {}
        },
        "overrides": []
      },
      "gridPos": {
        "h": 14,
        "w": 11,
        "x": 0,
        "y": 1
      },
      "hideEmpty": false,
      "hideTimeOverride": true,
      "hideZero": false,
      "id": 2,
      "initialZoom": "2",
      "interval": "",
      "links": [],
      "locationData": "table",
      "mapCenter": "custom",
      "mapCenterLatitude": 46,
      "mapCenterLongitude": 14,
      "maxDataPoints": 1,
      "mouseWheelZoom": true,
      "showLegend": true,
      "stickyLabels": true,
      "tableQueryOptions": {
        "geohashField": "geohash",
        "labelField": "city",
        "latitudeField": "latitude",
        "longitudeField": "longitude",
        "metricField": "metric",
        "queryType": "geohash"
      },
      "targets": [
        {
          "alias": "",
          "groupBy": [
            {
              "params": [
                "geohash"
              ],
              "type": "tag"
            },
            {
              "params": [
                "city"
              ],
              "type": "tag"
            }
          ],
          "measurement": "geoip2influx",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "count"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "sum"
              },
              {
                "params": [
                  "metric"
                ],
                "type": "alias"
              }
            ]
          ],
          "tags": [
            {
              "key": "ip",
              "operator": "!~",
              "value": "/^$excluded_ip$/"
            },
            {
              "condition": "AND",
              "key": "country_name",
              "operator": "=~",
              "value": "/^$country$/"
            },
            {
              "condition": "AND",
              "key": "country_code",
              "operator": "=~",
              "value": "/^$country_code$/"
            },
            {
              "condition": "AND",
              "key": "city",
              "operator": "=~",
              "value": "/^$city$/"
            }
          ]
        }
      ],
      "thresholds": "100,500",
      "timeFrom": "$geo_interval",
      "title": "GEOMAP",
      "type": "grafana-worldmap-panel",
      "unitPlural": "",
      "unitSingle": "",
      "unitSingular": "",
      "valueName": "total"
    },
    {
      "datasource": "$datasource",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "continuous-GrYlRd"
          },
          "custom": {
            "align": "left",
            "filterable": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Count"
            },
            "properties": [
              {
                "id": "thresholds",
                "value": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "rgba(50, 172, 45, 0.97)",
                      "value": null
                    },
                    {
                      "color": "rgba(237, 129, 40, 0.89)",
                      "value": 5000
                    },
                    {
                      "color": "rgba(245, 54, 54, 0.9)",
                      "value": 10000
                    }
                  ]
                }
              },
              {
                "id": "custom.displayMode",
                "value": "color-background"
              },
              {
                "id": "color",
                "value": {
                  "mode": "thresholds"
                }
              },
              {
                "id": "custom.width",
                "value": 84
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Domain"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 286
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 14,
        "w": 5,
        "x": 11,
        "y": 1
      },
      "hideTimeOverride": true,
      "id": 14,
      "options": {
        "showHeader": true,
        "sortBy": [
          {
            "desc": true,
            "displayName": "Count"
          }
        ]
      },
      "pluginVersion": "7.3.6",
      "targets": [
        {
          "groupBy": [
            {
              "params": [
                "host"
              ],
              "type": "tag"
            }
          ],
          "limit": "15",
          "measurement": "nginx_access_logs",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "count"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "sum"
              }
            ]
          ],
          "tags": [
            {
              "key": "ip",
              "operator": "!~",
              "value": "/^$excluded_ip$/"
            }
          ]
        }
      ],
      "timeFrom": "$geo_interval",
      "timeShift": null,
      "title": "Top visited domains",
      "transformations": [
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "Time": true
            },
            "indexByName": {},
            "renameByName": {
              "host": "Domain",
              "sum": "Count"
            }
          }
        }
      ],
      "type": "table"
    },
    {
      "cacheTimeout": null,
      "datasource": "$datasource",
      "fieldConfig": {
        "defaults": {
          "custom": {},
          "displayName": "",
          "mappings": [],
          "nullValueMode": "connected",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "rgba(50, 172, 45, 0.97)",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 524300000
              },
              {
                "color": "red",
                "value": 1049000000
              }
            ]
          },
          "unit": "bytes"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 3,
        "w": 5,
        "x": 16,
        "y": 1
      },
      "hideTimeOverride": true,
      "id": 19,
      "links": [],
      "options": {
        "colorMode": "background",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "sum"
          ],
          "fields": "",
          "values": false
        },
        "textMode": "auto"
      },
      "pluginVersion": "7.3.6",
      "targets": [
        {
          "alias": "",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "measurement": "nginx_access_logs",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "bytes_sent"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "sum"
              }
            ]
          ],
          "tags": [
            {
              "key": "ip",
              "operator": "!~",
              "value": "/^$excluded_ip$/"
            },
            {
              "condition": "AND",
              "key": "city",
              "operator": "=~",
              "value": "/^$city$/"
            },
            {
              "condition": "AND",
              "key": "country_code",
              "operator": "=~",
              "value": "/^$country_code$/"
            },
            {
              "condition": "AND",
              "key": "country_name",
              "operator": "=~",
              "value": "/^$country$/"
            },
            {
              "condition": "AND",
              "key": "host",
              "operator": "=~",
              "value": "/^$domain$/"
            }
          ]
        }
      ],
      "timeFrom": "$geo_interval",
      "timeShift": null,
      "title": "Data Transmitted",
      "type": "stat"
    },
    {
      "cacheTimeout": null,
      "datasource": "$datasource",
      "fieldConfig": {
        "defaults": {
          "custom": {},
          "displayName": "",
          "mappings": [],
          "nullValueMode": "connected",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "rgba(50, 172, 45, 0.97)",
                "value": null
              },
              {
                "color": "#EAB839",
                "value": 5000
              },
              {
                "color": "red",
                "value": 10000
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 3,
        "w": 3,
        "x": 21,
        "y": 1
      },
      "hideTimeOverride": true,
      "id": 25,
      "links": [],
      "options": {
        "colorMode": "background",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "sum"
          ],
          "fields": "",
          "values": false
        },
        "textMode": "auto"
      },
      "pluginVersion": "7.3.6",
      "targets": [
        {
          "alias": "",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "measurement": "geoip2influx",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "count"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "count"
              }
            ]
          ],
          "tags": [
            {
              "key": "ip",
              "operator": "!~",
              "value": "/^$excluded_ip$/"
            },
            {
              "condition": "AND",
              "key": "country_code",
              "operator": "=~",
              "value": "/^$country_code$/"
            },
            {
              "condition": "AND",
              "key": "country_name",
              "operator": "=~",
              "value": "/^$country$/"
            },
            {
              "condition": "AND",
              "key": "city",
              "operator": "=~",
              "value": "/^$city$/"
            }
          ]
        }
      ],
      "timeFrom": "$geo_interval",
      "timeShift": null,
      "title": "Total Requests",
      "type": "stat"
    },
    {
      "cacheTimeout": null,
      "datasource": "$datasource",
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": null,
            "filterable": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Count"
            },
            "properties": [
              {
                "id": "custom.displayMode",
                "value": "color-background"
              },
              {
                "id": "thresholds",
                "value": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "rgba(50, 172, 45, 0.97)",
                      "value": null
                    },
                    {
                      "color": "rgba(237, 129, 40, 0.89)",
                      "value": 500
                    },
                    {
                      "color": "rgba(245, 54, 54, 0.9)",
                      "value": 1000
                    }
                  ]
                }
              },
              {
                "id": "custom.width",
                "value": 74
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "IP"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 123
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 11,
        "w": 5,
        "x": 16,
        "y": 4
      },
      "hideTimeOverride": true,
      "id": 21,
      "links": [],
      "options": {
        "showHeader": true,
        "sortBy": [
          {
            "desc": true,
            "displayName": "Count"
          }
        ]
      },
      "pluginVersion": "7.3.6",
      "targets": [
        {
          "groupBy": [
            {
              "params": [
                "ip"
              ],
              "type": "tag"
            },
            {
              "params": [
                "country_name"
              ],
              "type": "tag"
            }
          ],
          "measurement": "geoip2influx",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "count"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "sum"
              }
            ]
          ],
          "tags": [
            {
              "key": "ip",
              "operator": "!~",
              "value": "/^$excluded_ip$/"
            },
            {
              "condition": "AND",
              "key": "country_name",
              "operator": "=~",
              "value": "/^$country$/"
            },
            {
              "condition": "AND",
              "key": "country_code",
              "operator": "=~",
              "value": "/^$country_code$/"
            },
            {
              "condition": "AND",
              "key": "city",
              "operator": "=~",
              "value": "/^$city$/"
            }
          ]
        }
      ],
      "timeFrom": "$geo_interval",
      "timeShift": null,
      "title": "Top IP/Country",
      "transformations": [
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "Time": true
            },
            "indexByName": {},
            "renameByName": {
              "country_name": "Country",
              "ip": "IP",
              "sum": "Count"
            }
          }
        }
      ],
      "type": "table"
    },
    {
      "datasource": "$datasource",
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": "left",
            "filterable": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Count"
            },
            "properties": [
              {
                "id": "custom.displayMode",
                "value": "color-background"
              },
              {
                "id": "thresholds",
                "value": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "rgba(50, 172, 45, 0.97)",
                      "value": null
                    },
                    {
                      "color": "rgba(237, 129, 40, 0.89)",
                      "value": 5000
                    },
                    {
                      "color": "rgba(245, 54, 54, 0.9)",
                      "value": 10000
                    }
                  ]
                }
              },
              {
                "id": "custom.width",
                "value": 92
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Country Code"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 127
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 11,
        "w": 3,
        "x": 21,
        "y": 4
      },
      "hideTimeOverride": true,
      "id": 26,
      "options": {
        "showHeader": true,
        "sortBy": [
          {
            "desc": true,
            "displayName": "Count"
          }
        ]
      },
      "pluginVersion": "7.3.6",
      "targets": [
        {
          "groupBy": [
            {
              "params": [
                "country_code"
              ],
              "type": "tag"
            }
          ],
          "limit": "15",
          "measurement": "geoip2influx",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "count"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "sum"
              }
            ]
          ],
          "tags": [
            {
              "key": "ip",
              "operator": "!~",
              "value": "/^$excluded_ip$/"
            },
            {
              "condition": "AND",
              "key": "country_code",
              "operator": "=~",
              "value": "/^$country_code$/"
            }
          ]
        }
      ],
      "timeFrom": "$geo_interval",
      "timeShift": null,
      "title": "Top 15 countries",
      "transformations": [
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "Time": true
            },
            "indexByName": {},
            "renameByName": {
              "country_code": "Country Code",
              "sum": "Count"
            }
          }
        }
      ],
      "type": "table"
    },
    {
      "datasource": "$datasource",
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": null,
            "filterable": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Latitude"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 70
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Longitude"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 94
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Postal Code"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 97
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 8,
        "w": 24,
        "x": 0,
        "y": 15
      },
      "hideTimeOverride": true,
      "id": 4,
      "links": [],
      "options": {
        "showHeader": true,
        "sortBy": [
          {
            "desc": true,
            "displayName": "Count"
          }
        ]
      },
      "pluginVersion": "7.3.6",
      "targets": [
        {
          "groupBy": [
            {
              "params": [
                "city"
              ],
              "type": "tag"
            },
            {
              "params": [
                "country_name"
              ],
              "type": "tag"
            },
            {
              "params": [
                "country_code"
              ],
              "type": "tag"
            },
            {
              "params": [
                "state"
              ],
              "type": "tag"
            },
            {
              "params": [
                "postal_code"
              ],
              "type": "tag"
            },
            {
              "params": [
                "state_code"
              ],
              "type": "tag"
            },
            {
              "params": [
                "latitude"
              ],
              "type": "tag"
            },
            {
              "params": [
                "longitude"
              ],
              "type": "tag"
            },
            {
              "params": [
                "ip"
              ],
              "type": "tag"
            }
          ],
          "measurement": "geoip2influx",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "count"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "sum"
              }
            ]
          ],
          "tags": [
            {
              "key": "ip",
              "operator": "!~",
              "value": "/^$excluded_ip$/"
            },
            {
              "condition": "AND",
              "key": "country_name",
              "operator": "=~",
              "value": "/^$country$/"
            },
            {
              "condition": "AND",
              "key": "country_code",
              "operator": "=~",
              "value": "/^$country_code$/"
            },
            {
              "condition": "AND",
              "key": "city",
              "operator": "=~",
              "value": "/^$city$/"
            }
          ]
        }
      ],
      "timeFrom": "$geo_interval",
      "timeShift": null,
      "title": "Detailed location data",
      "transformations": [
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "Time": true
            },
            "indexByName": {},
            "renameByName": {
              "Time": "",
              "city": "City",
              "country_code": "Country Code",
              "country_name": "Country",
              "ip": "IP",
              "latitude": "Latitude",
              "longitude": "Longitude",
              "postal_code": "Postal Code",
              "state": "State",
              "state_code": "State (ANSI)",
              "sum": "Count"
            }
          }
        }
      ],
      "type": "table"
    },
    {
      "aliasColors": {
        "Requests": "red",
        "geoip2influx.sum": "red"
      },
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "$datasource",
      "fieldConfig": {
        "defaults": {
          "custom": {},
          "links": []
        },
        "overrides": []
      },
      "fill": 7,
      "fillGradient": 0,
      "gridPos": {
        "h": 8,
        "w": 13,
        "x": 0,
        "y": 23
      },
      "hiddenSeries": false,
      "hideTimeOverride": true,
      "id": 23,
      "interval": "",
      "legend": {
        "alignAsTable": false,
        "avg": false,
        "current": false,
        "hideEmpty": false,
        "max": false,
        "min": false,
        "rightSide": false,
        "show": false,
        "sort": "current",
        "sortDesc": true,
        "total": false,
        "values": false
      },
      "lines": true,
      "linewidth": 2,
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "7.3.6",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": true,
      "steppedLine": false,
      "targets": [
        {
          "alias": "$tag_country_name",
          "groupBy": [
            {
              "params": [
                "$interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "country_name"
              ],
              "type": "tag"
            },
            {
              "params": [
                "none"
              ],
              "type": "fill"
            }
          ],
          "measurement": "geoip2influx",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "count"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "sum"
              },
              {
                "params": [],
                "type": "cumulative_sum"
              }
            ]
          ],
          "tags": [
            {
              "key": "ip",
              "operator": "!~",
              "value": "/^$excluded_ip$/"
            },
            {
              "condition": "AND",
              "key": "country_name",
              "operator": "=~",
              "value": "/^$country$/"
            },
            {
              "condition": "AND",
              "key": "country_code",
              "operator": "=~",
              "value": "/^$country_code$/"
            },
            {
              "condition": "AND",
              "key": "city",
              "operator": "=~",
              "value": "/^$city$/"
            }
          ]
        }
      ],
      "thresholds": [],
      "timeFrom": "$geo_interval",
      "timeRegions": [],
      "timeShift": null,
      "title": "Request count cumulative ",
      "tooltip": {
        "shared": true,
        "sort": 2,
        "value_type": "individual"
      },
      "transformations": [],
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:874",
          "format": "none",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "$$hashKey": "object:875",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "aliasColors": {
        "Requests": "red",
        "geoip2influx.sum": "red"
      },
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "$datasource",
      "description": "",
      "fieldConfig": {
        "defaults": {
          "custom": {},
          "links": []
        },
        "overrides": []
      },
      "fill": 7,
      "fillGradient": 0,
      "gridPos": {
        "h": 8,
        "w": 11,
        "x": 13,
        "y": 23
      },
      "hiddenSeries": false,
      "hideTimeOverride": true,
      "id": 24,
      "interval": "",
      "legend": {
        "alignAsTable": true,
        "avg": false,
        "current": true,
        "hideEmpty": false,
        "max": false,
        "min": false,
        "rightSide": true,
        "show": false,
        "sort": "current",
        "sortDesc": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "7.3.6",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": true,
      "steppedLine": false,
      "targets": [
        {
          "alias": "$tag_country_code",
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "country_code"
              ],
              "type": "tag"
            },
            {
              "params": [
                "none"
              ],
              "type": "fill"
            }
          ],
          "hide": false,
          "measurement": "nginx_access_logs",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "time_series",
          "select": [
            [
              {
                "params": [
                  "bytes_sent"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "sum"
              },
              {
                "params": [],
                "type": "cumulative_sum"
              }
            ]
          ],
          "tags": [
            {
              "key": "ip",
              "operator": "!~",
              "value": "/^$excluded_ip$/"
            },
            {
              "condition": "AND",
              "key": "country_code",
              "operator": "=~",
              "value": "/^$country_code$/"
            },
            {
              "condition": "AND",
              "key": "city",
              "operator": "=~",
              "value": "/^$city$/"
            },
            {
              "condition": "AND",
              "key": "country_name",
              "operator": "=~",
              "value": "/^$country$/"
            },
            {
              "condition": "AND",
              "key": "host",
              "operator": "=~",
              "value": "/^$domain$/"
            }
          ]
        }
      ],
      "thresholds": [],
      "timeFrom": "$log_interval",
      "timeRegions": [],
      "timeShift": null,
      "title": "Bytes sum cumulative ",
      "tooltip": {
        "shared": true,
        "sort": 2,
        "value_type": "individual"
      },
      "transformations": [],
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:874",
          "format": "decbytes",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "$$hashKey": "object:875",
          "format": "short",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": false
        }
      ],
      "yaxis": {
        "align": false,
        "alignLevel": null
      }
    },
    {
      "collapsed": false,
      "datasource": "${DS_TELEGRAF}",
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 31
      },
      "id": 10,
      "panels": [],
      "title": "NGINX LOGs",
      "type": "row"
    },
    {
      "datasource": "$datasource",
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": null,
            "filterable": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "datetime"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 211
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Connect Time"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 110
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Country Code"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 102
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "City"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 84
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Bytes Sent"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 84
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Count"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 53
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Method"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 68
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "IP"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 121
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "HTTP Version"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 108
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Country"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 86
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "URL"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 415
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Status Code"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 94
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Date"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 193
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Domain"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 171
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 10,
        "w": 24,
        "x": 0,
        "y": 32
      },
      "hideTimeOverride": true,
      "id": 17,
      "options": {
        "showHeader": true,
        "sortBy": [
          {
            "desc": true,
            "displayName": "Date"
          }
        ]
      },
      "pluginVersion": "7.3.6",
      "targets": [
        {
          "groupBy": [
            {
              "params": [
                "url"
              ],
              "type": "tag"
            },
            {
              "params": [
                "ip"
              ],
              "type": "tag"
            },
            {
              "params": [
                "city"
              ],
              "type": "tag"
            },
            {
              "params": [
                "country_code"
              ],
              "type": "tag"
            },
            {
              "params": [
                "datetime"
              ],
              "type": "tag"
            },
            {
              "params": [
                "http_version"
              ],
              "type": "tag"
            },
            {
              "params": [
                "method"
              ],
              "type": "tag"
            },
            {
              "params": [
                "referrer"
              ],
              "type": "tag"
            },
            {
              "params": [
                "remote_user"
              ],
              "type": "tag"
            },
            {
              "params": [
                "status_code"
              ],
              "type": "tag"
            },
            {
              "params": [
                "connect_time"
              ],
              "type": "tag"
            },
            {
              "params": [
                "bytes_sent"
              ],
              "type": "tag"
            },
            {
              "params": [
                "country_name"
              ],
              "type": "tag"
            },
            {
              "params": [
                "host"
              ],
              "type": "tag"
            }
          ],
          "hide": false,
          "limit": "",
          "measurement": "nginx_access_logs",
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT count(\"count\") FROM \"nginx_access_logs\" WHERE $timeFilter GROUP BY \"url\", \"ip\", \"city\", \"country_code\", \"datetime\", \"http_version\", \"method\", \"referrer\", \"remote_user\", \"status_code\", \"connect_time\", \"bytes_sent\" LIMIT 50",
          "rawQuery": false,
          "refId": "A",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "count"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "distinct"
              }
            ]
          ],
          "slimit": "",
          "tags": [
            {
              "key": "ip",
              "operator": "!~",
              "value": "/^$excluded_ip$/"
            },
            {
              "condition": "AND",
              "key": "country_code",
              "operator": "=~",
              "value": "/^$country_code$/"
            },
            {
              "condition": "AND",
              "key": "city",
              "operator": "=~",
              "value": "/^$city$/"
            },
            {
              "condition": "AND",
              "key": "country_name",
              "operator": "=~",
              "value": "/^$country$/"
            },
            {
              "condition": "AND",
              "key": "host",
              "operator": "=~",
              "value": "/^$domain$/"
            }
          ]
        }
      ],
      "timeFrom": "$log_interval",
      "timeShift": null,
      "title": "Nginx Logs",
      "transformations": [
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "Time": true
            },
            "indexByName": {
              "Time": 0,
              "bytes_sent": 12,
              "city": 2,
              "connect_time": 13,
              "country_code": 4,
              "country_name": 5,
              "datetime": 1,
              "distinct": 15,
              "host": 6,
              "http_version": 9,
              "ip": 3,
              "method": 7,
              "referrer": 11,
              "remote_user": 14,
              "status_code": 8,
              "url": 10
            },
            "renameByName": {
              "bytes_sent": "Bytes Sent",
              "city": "City",
              "connect_time": "Connect Time",
              "country_code": "Country Code",
              "country_name": "Country",
              "datetime": "Date",
              "distinct": "Count",
              "host": "Domain",
              "http_version": "HTTP Version",
              "ip": "IP",
              "method": "Method",
              "referrer": "Referrer",
              "remote_user": "Remote User",
              "status_code": "Status Code",
              "url": "URL"
            }
          }
        }
      ],
      "type": "table"
    },
    {
      "columns": [],
      "datasource": "$datasource",
      "fieldConfig": {
        "defaults": {
          "custom": {}
        },
        "overrides": []
      },
      "fontSize": "100%",
      "gridPos": {
        "h": 13,
        "w": 24,
        "x": 0,
        "y": 42
      },
      "hideTimeOverride": true,
      "id": 16,
      "pageSize": null,
      "showHeader": true,
      "sort": {
        "col": 3,
        "desc": true
      },
      "styles": [
        {
          "$$hashKey": "object:4905",
          "alias": "Time",
          "align": "auto",
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "pattern": "Time",
          "type": "hidden"
        },
        {
          "$$hashKey": "object:4906",
          "alias": "URL",
          "align": "",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "decimals": 2,
          "link": true,
          "pattern": "url",
          "preserveFormat": false,
          "thresholds": [],
          "type": "string",
          "unit": "short"
        },
        {
          "$$hashKey": "object:5035",
          "alias": "Count",
          "align": "auto",
          "colorMode": "cell",
          "colors": [
            "rgba(50, 172, 45, 0.97)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(245, 54, 54, 0.9)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 0,
          "mappingType": 1,
          "pattern": "sum",
          "thresholds": [
            "500",
            "1000"
          ],
          "type": "number",
          "unit": "none"
        },
        {
          "$$hashKey": "object:1519",
          "alias": "Referrer",
          "align": "auto",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "mappingType": 1,
          "pattern": "referrer",
          "thresholds": [],
          "type": "number",
          "unit": "short"
        }
      ],
      "targets": [
        {
          "groupBy": [
            {
              "params": [
                "url"
              ],
              "type": "tag"
            },
            {
              "params": [
                "referrer"
              ],
              "type": "tag"
            }
          ],
          "hide": false,
          "limit": "",
          "measurement": "nginx_access_logs",
          "orderByTime": "ASC",
          "policy": "default",
          "refId": "A",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "count"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "sum"
              }
            ]
          ],
          "slimit": "",
          "tags": [
            {
              "key": "ip",
              "operator": "!~",
              "value": "/^$excluded_ip$/"
            },
            {
              "condition": "AND",
              "key": "country_code",
              "operator": "=~",
              "value": "/^$country_code$/"
            },
            {
              "condition": "AND",
              "key": "city",
              "operator": "=~",
              "value": "/^$city$/"
            },
            {
              "condition": "AND",
              "key": "country_name",
              "operator": "=~",
              "value": "/^$country$/"
            },
            {
              "condition": "AND",
              "key": "host",
              "operator": "=~",
              "value": "/^$domain$/"
            }
          ]
        }
      ],
      "timeFrom": "$log_interval",
      "timeShift": null,
      "title": "Top Visited URL's",
      "transform": "table",
      "type": "table-old"
    }
  ],
  "refresh": "10s",
  "schemaVersion": 26,
  "style": "dark",
  "tags": [
    "nginx",
    "geoip2",
    "python",
    "influxdb"
  ],
  "templating": {
    "list": [
      {
        "current": {
          "selected": false,
          "text": "InfluxDB GEOIP_NGINX_LOGS",
          "value": "InfluxDB GEOIP_NGINX_LOGS"
        },
        "error": null,
        "hide": 0,
        "includeAll": false,
        "label": null,
        "multi": false,
        "name": "datasource",
        "options": [],
        "query": "influxdb",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "type": "datasource"
      },
      {
        "allValue": null,
        "current": {
          "$$hashKey": "object:12337",
          "selected": true,
          "text": "1h",
          "value": "1h"
        },
        "error": null,
        "hide": 0,
        "includeAll": false,
        "label": "Nginx Log Interval",
        "multi": false,
        "name": "log_interval",
        "options": [
          {
            "$$hashKey": "object:12334",
            "selected": false,
            "text": "1m",
            "value": "1m"
          },
          {
            "$$hashKey": "object:12335",
            "selected": false,
            "text": "10m",
            "value": "10m"
          },
          {
            "$$hashKey": "object:12336",
            "selected": false,
            "text": "30m",
            "value": "30m"
          },
          {
            "$$hashKey": "object:12337",
            "selected": true,
            "text": "1h",
            "value": "1h"
          },
          {
            "$$hashKey": "object:12338",
            "selected": false,
            "text": "6h",
            "value": "6h"
          },
          {
            "$$hashKey": "object:12339",
            "selected": false,
            "text": "12h",
            "value": "12h"
          },
          {
            "$$hashKey": "object:12340",
            "selected": false,
            "text": "1d",
            "value": "1d"
          },
          {
            "$$hashKey": "object:12341",
            "selected": false,
            "text": "7d",
            "value": "7d"
          },
          {
            "$$hashKey": "object:12342",
            "selected": false,
            "text": "14d",
            "value": "14d"
          },
          {
            "$$hashKey": "object:12343",
            "selected": false,
            "text": "30d",
            "value": "30d"
          },
          {
            "$$hashKey": "object:12344",
            "selected": false,
            "text": "now/d",
            "value": "now/d"
          },
          {
            "$$hashKey": "object:12345",
            "selected": false,
            "text": "now-1d/d",
            "value": "now-1d/d"
          }
        ],
        "query": "1m,10m,30m,1h,6h,12h,1d,7d,14d,30d,now/d,now-1d/d",
        "queryValue": "",
        "skipUrlSync": false,
        "type": "custom"
      },
      {
        "allValue": null,
        "current": {
          "selected": false,
          "text": "now/d",
          "value": "now/d"
        },
        "error": null,
        "hide": 0,
        "includeAll": false,
        "label": "Geo Data Interval",
        "multi": false,
        "name": "geo_interval",
        "options": [
          {
            "$$hashKey": "object:11661",
            "selected": false,
            "text": "1m",
            "value": "1m"
          },
          {
            "$$hashKey": "object:11662",
            "selected": false,
            "text": "10m",
            "value": "10m"
          },
          {
            "$$hashKey": "object:11663",
            "selected": false,
            "text": "30m",
            "value": "30m"
          },
          {
            "$$hashKey": "object:11664",
            "selected": false,
            "text": "1h",
            "value": "1h"
          },
          {
            "$$hashKey": "object:11665",
            "selected": false,
            "text": "6h",
            "value": "6h"
          },
          {
            "$$hashKey": "object:11666",
            "selected": false,
            "text": "12h",
            "value": "12h"
          },
          {
            "$$hashKey": "object:11667",
            "selected": false,
            "text": "1d",
            "value": "1d"
          },
          {
            "$$hashKey": "object:11668",
            "selected": false,
            "text": "7d",
            "value": "7d"
          },
          {
            "$$hashKey": "object:11669",
            "selected": false,
            "text": "14d",
            "value": "14d"
          },
          {
            "$$hashKey": "object:11670",
            "selected": false,
            "text": "30d",
            "value": "30d"
          },
          {
            "$$hashKey": "object:11671",
            "selected": true,
            "text": "now/d",
            "value": "now/d"
          },
          {
            "$$hashKey": "object:11672",
            "selected": false,
            "text": "now-1d/d",
            "value": "now-1d/d"
          }
        ],
        "query": "1m,10m,30m,1h,6h,12h,1d,7d,14d,30d,now/d,now-1d/d",
        "skipUrlSync": false,
        "type": "custom"
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "$datasource",
        "definition": "SHOW TAG VALUES FROM \"geoip2influx\" WITH KEY = \"country_name\"",
        "error": null,
        "hide": 0,
        "includeAll": true,
        "label": "Country",
        "multi": true,
        "name": "country",
        "options": [],
        "query": "SHOW TAG VALUES FROM \"geoip2influx\" WITH KEY = \"country_name\"",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": true
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "$datasource",
        "definition": "SHOW TAG VALUES FROM \"geoip2influx\" WITH KEY = \"country_code\"",
        "error": null,
        "hide": 0,
        "includeAll": true,
        "label": "Country Code",
        "multi": true,
        "name": "country_code",
        "options": [],
        "query": "SHOW TAG VALUES FROM \"geoip2influx\" WITH KEY = \"country_code\"",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": "",
        "current": {},
        "datasource": "$datasource",
        "definition": "SHOW TAG VALUES FROM \"geoip2influx\" WITH KEY = \"city\"",
        "error": null,
        "hide": 0,
        "includeAll": true,
        "label": "City",
        "multi": true,
        "name": "city",
        "options": [],
        "query": "SHOW TAG VALUES FROM \"geoip2influx\" WITH KEY = \"city\"",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "$datasource",
        "definition": "SHOW TAG VALUES FROM \"nginx_access_logs\" WITH KEY = \"host\"",
        "error": null,
        "hide": 0,
        "includeAll": true,
        "label": "Domains",
        "multi": false,
        "name": "domain",
        "options": [],
        "query": "SHOW TAG VALUES FROM \"nginx_access_logs\" WITH KEY = \"host\"",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "current": {
          "selected": false,
          "text": "",
          "value": ""
        },
        "error": null,
        "hide": 0,
        "label": "Exclude IP",
        "name": "excluded_ip",
        "options": [
          {
            "selected": true,
            "text": "",
            "value": ""
          }
        ],
        "query": "",
        "skipUrlSync": false,
        "type": "textbox"
      }
    ]
  },
  "time": {
    "from": "now/d",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ],
    "time_options": [
      "5m",
      "15m",
      "1h",
      "6h",
      "12h",
      "24h",
      "2d",
      "7d",
      "30d"
    ]
  },
  "timezone": "",
  "title": "NGINX LOGS & GEO MAP",
  "uid": "1lcjN0bik3",
  "version": 26
}