{
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": {
          "type": "grafana",
          "uid": "-- Grafana --"
        },
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard"
      }
    ]
  },
  "description": "Nginx dashboard with geoip. nginx prometheus exporter is described here: https://github.com/nginx/nginx-prometheus-exporter?tab=readme-ov-file#stub-status-metrics",
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 0,
  "id": 0,
  "links": [],
  "liveNow": true,
  "panels": [
    {
      "datasource": {
        "type": "loki",
        "uid": "P8E80F9AEF21F6940"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            }
          },
          "fieldMinMax": false,
          "mappings": [],
          "min": 0
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 6,
        "x": 0,
        "y": 0
      },
      "id": 16,
      "options": {
        "displayLabels": [],
        "legend": {
          "displayMode": "table",
          "placement": "right",
          "showLegend": true,
          "values": [
            "percent",
            "value"
          ]
        },
        "pieType": "pie",
        "reduceOptions": {
          "calcs": [],
          "fields": "/^country_count \\(count\\)$/",
          "values": true
        },
        "sort": "desc",
        "tooltip": {
          "hideZeros": false,
          "mode": "single",
          "sort": "asc"
        }
      },
      "pluginVersion": "12.3.2",
      "targets": [
        {
          "datasource": {
            "type": "loki",
            "uid": "P8E80F9AEF21F6940"
          },
          "direction": "backward",
          "editorMode": "code",
          "expr": "{filename=~\"/var/log/nginx/.*.access.log\", instance=\"$node\"}",
          "legendFormat": "",
          "maxLines": 99999,
          "queryType": "range",
          "refId": "A"
        }
      ],
      "title": "Visits by Country",
      "transformations": [
        {
          "id": "extractFields",
          "options": {
            "delimiter": ",",
            "format": "json",
            "jsonPaths": [],
            "keepTime": false,
            "replace": true,
            "source": "Line"
          }
        },
        {
          "id": "calculateField",
          "options": {
            "alias": "country_count",
            "mode": "reduceRow",
            "reduce": {
              "include": [
                "country_code"
              ],
              "reducer": "count"
            },
            "replaceFields": false
          }
        },
        {
          "id": "filterByValue",
          "options": {
            "filters": [
              {
                "config": {
                  "id": "equal",
                  "options": {
                    "value": "${monitoring_ip}"
                  }
                },
                "fieldName": "ip"
              },
              {
                "config": {
                  "id": "regex",
                  "options": {
                    "value": "${monitoring_agent}"
                  }
                },
                "fieldName": "user_agent"
              }
            ],
            "match": "any",
            "type": "exclude"
          }
        },
        {
          "id": "groupBy",
          "options": {
            "fields": {
              "Cunt": {
                "aggregations": [
                  "count"
                ],
                "operation": "aggregate"
              },
              "Default": {
                "aggregations": [
                  "count"
                ],
                "operation": "aggregate"
              },
              "country_code": {
                "aggregations": []
              },
              "country_count": {
                "aggregations": [
                  "count"
                ],
                "operation": "aggregate"
              },
              "country_name": {
                "aggregations": [],
                "operation": "groupby"
              },
              "cunt": {
                "aggregations": [
                  "sum"
                ],
                "operation": "aggregate"
              },
              "domain": {
                "aggregations": []
              },
              "domain_count": {
                "aggregations": [
                  "count"
                ],
                "operation": "aggregate"
              },
              "domain_visit_count": {
                "aggregations": [
                  "count"
                ],
                "operation": "aggregate"
              },
              "ip": {
                "aggregations": []
              },
              "ip_count": {
                "aggregations": [
                  "count"
                ],
                "operation": "aggregate"
              },
              "user_agent": {
                "aggregations": [],
                "operation": "aggregate"
              }
            }
          }
        },
        {
          "id": "filterByValue",
          "options": {
            "filters": [
              {
                "config": {
                  "id": "isNull",
                  "options": {}
                },
                "fieldName": "country_name"
              }
            ],
            "match": "all",
            "type": "exclude"
          }
        }
      ],
      "type": "piechart"
    },
    {
      "datasource": {
        "type": "loki",
        "uid": "P8E80F9AEF21F6940"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            }
          },
          "fieldMinMax": false,
          "mappings": [],
          "min": 0
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 6,
        "x": 6,
        "y": 0
      },
      "id": 17,
      "options": {
        "displayLabels": [],
        "legend": {
          "displayMode": "table",
          "placement": "right",
          "showLegend": true,
          "values": [
            "percent",
            "value"
          ]
        },
        "pieType": "pie",
        "reduceOptions": {
          "calcs": [],
          "fields": "/^city_count \\(count\\)$/",
          "values": true
        },
        "sort": "desc",
        "tooltip": {
          "hideZeros": false,
          "mode": "single",
          "sort": "asc"
        }
      },
      "pluginVersion": "12.3.2",
      "targets": [
        {
          "datasource": {
            "type": "loki",
            "uid": "P8E80F9AEF21F6940"
          },
          "direction": "backward",
          "editorMode": "code",
          "expr": "{filename=~\"/var/log/nginx/.*.access.log\", instance=\"$node\"}",
          "legendFormat": "",
          "maxLines": 99999,
          "queryType": "range",
          "refId": "A"
        }
      ],
      "title": "Visits by City",
      "transformations": [
        {
          "id": "extractFields",
          "options": {
            "delimiter": ",",
            "format": "json",
            "jsonPaths": [],
            "keepTime": false,
            "replace": true,
            "source": "Line"
          }
        },
        {
          "id": "calculateField",
          "options": {
            "alias": "city_count",
            "mode": "reduceRow",
            "reduce": {
              "include": [
                "city",
                "country_code"
              ],
              "reducer": "count"
            },
            "replaceFields": false
          }
        },
        {
          "id": "filterByValue",
          "options": {
            "filters": [
              {
                "config": {
                  "id": "equal",
                  "options": {
                    "value": "${monitoring_ip}"
                  }
                },
                "fieldName": "ip"
              },
              {
                "config": {
                  "id": "regex",
                  "options": {
                    "value": "${monitoring_agent}"
                  }
                },
                "fieldName": "user_agent"
              }
            ],
            "match": "all",
            "type": "exclude"
          }
        },
        {
          "id": "groupBy",
          "options": {
            "fields": {
              "Cunt": {
                "aggregations": [
                  "count"
                ],
                "operation": "aggregate"
              },
              "Default": {
                "aggregations": [
                  "count"
                ],
                "operation": "aggregate"
              },
              "city": {
                "aggregations": [],
                "operation": "groupby"
              },
              "city_count": {
                "aggregations": [
                  "count"
                ],
                "operation": "aggregate"
              },
              "country_code": {
                "aggregations": [],
                "operation": "groupby"
              },
              "country_count": {
                "aggregations": [
                  "count"
                ],
                "operation": "aggregate"
              },
              "cunt": {
                "aggregations": [
                  "sum"
                ],
                "operation": "aggregate"
              },
              "domain": {
                "aggregations": []
              },
              "domain_count": {
                "aggregations": [
                  "count"
                ],
                "operation": "aggregate"
              },
              "domain_visit_count": {
                "aggregations": [
                  "count"
                ],
                "operation": "aggregate"
              },
              "ip": {
                "aggregations": []
              },
              "ip_count": {
                "aggregations": [
                  "count"
                ],
                "operation": "aggregate"
              }
            }
          }
        },
        {
          "id": "filterByValue",
          "options": {
            "filters": [
              {
                "config": {
                  "id": "isNull",
                  "options": {}
                },
                "fieldName": "city"
              }
            ],
            "match": "all",
            "type": "exclude"
          }
        }
      ],
      "type": "piechart"
    },
    {
      "datasource": {
        "type": "loki",
        "uid": "P8E80F9AEF21F6940"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            }
          },
          "fieldMinMax": false,
          "mappings": [],
          "min": 0
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 6,
        "x": 12,
        "y": 0
      },
      "id": 15,
      "options": {
        "displayLabels": [],
        "legend": {
          "displayMode": "table",
          "placement": "right",
          "showLegend": true,
          "values": [
            "percent",
            "value"
          ]
        },
        "pieType": "pie",
        "reduceOptions": {
          "calcs": [],
          "fields": "/^ip_count \\(count\\)$/",
          "values": true
        },
        "sort": "desc",
        "tooltip": {
          "hideZeros": false,
          "mode": "single",
          "sort": "asc"
        }
      },
      "pluginVersion": "12.3.2",
      "targets": [
        {
          "datasource": {
            "type": "loki",
            "uid": "P8E80F9AEF21F6940"
          },
          "direction": "backward",
          "editorMode": "code",
          "expr": "{filename=~\"/var/log/nginx/.*.access.log\", instance=\"$node\"}",
          "legendFormat": "",
          "maxLines": 99999,
          "queryType": "range",
          "refId": "A"
        }
      ],
      "title": "Visits by IP",
      "transformations": [
        {
          "id": "extractFields",
          "options": {
            "delimiter": ",",
            "format": "json",
            "jsonPaths": [],
            "keepTime": false,
            "replace": true,
            "source": "Line"
          }
        },
        {
          "id": "calculateField",
          "options": {
            "alias": "ip_count",
            "mode": "reduceRow",
            "reduce": {
              "include": [
                "ip"
              ],
              "reducer": "count"
            },
            "replaceFields": false
          }
        },
        {
          "id": "filterByValue",
          "options": {
            "filters": [
              {
                "config": {
                  "id": "equal",
                  "options": {
                    "value": "${monitoring_ip}"
                  }
                },
                "fieldName": "ip"
              },
              {
                "config": {
                  "id": "regex",
                  "options": {
                    "value": "${monitoring_agent}"
                  }
                },
                "fieldName": "user_agent"
              }
            ],
            "match": "any",
            "type": "exclude"
          }
        },
        {
          "id": "groupBy",
          "options": {
            "fields": {
              "Cunt": {
                "aggregations": [
                  "count"
                ],
                "operation": "aggregate"
              },
              "Default": {
                "aggregations": [
                  "count"
                ],
                "operation": "aggregate"
              },
              "country_code": {
                "aggregations": [],
                "operation": "groupby"
              },
              "cunt": {
                "aggregations": [
                  "sum"
                ],
                "operation": "aggregate"
              },
              "domain": {
                "aggregations": []
              },
              "domain_count": {
                "aggregations": [
                  "count"
                ],
                "operation": "aggregate"
              },
              "domain_visit_count": {
                "aggregations": [
                  "count"
                ],
                "operation": "aggregate"
              },
              "ip": {
                "aggregations": [],
                "operation": "groupby"
              },
              "ip_count": {
                "aggregations": [
                  "count"
                ],
                "operation": "aggregate"
              }
            }
          }
        },
        {
          "id": "filterByValue",
          "options": {
            "filters": [
              {
                "config": {
                  "id": "isNull",
                  "options": {}
                },
                "fieldName": "ip"
              }
            ],
            "match": "all",
            "type": "exclude"
          }
        }
      ],
      "type": "piechart"
    },
    {
      "datasource": {
        "type": "loki",
        "uid": "P8E80F9AEF21F6940"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            }
          },
          "fieldMinMax": false,
          "mappings": [],
          "min": 0
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 6,
        "x": 18,
        "y": 0
      },
      "id": 13,
      "options": {
        "displayLabels": [],
        "legend": {
          "displayMode": "table",
          "placement": "right",
          "showLegend": true,
          "values": [
            "percent",
            "value"
          ]
        },
        "pieType": "pie",
        "reduceOptions": {
          "calcs": [],
          "fields": "/^domain_count \\(count\\)$/",
          "values": true
        },
        "sort": "desc",
        "tooltip": {
          "hideZeros": false,
          "mode": "single",
          "sort": "asc"
        }
      },
      "pluginVersion": "12.3.2",
      "targets": [
        {
          "datasource": {
            "type": "loki",
            "uid": "P8E80F9AEF21F6940"
          },
          "direction": "backward",
          "editorMode": "code",
          "expr": "{filename=~\"/var/log/nginx/.*.access.log\", instance=\"$node\"}",
          "legendFormat": "",
          "maxLines": 99999,
          "queryType": "range",
          "refId": "A"
        }
      ],
      "title": "Domain by visits",
      "transformations": [
        {
          "id": "extractFields",
          "options": {
            "delimiter": ",",
            "format": "json",
            "jsonPaths": [],
            "keepTime": false,
            "replace": true,
            "source": "Line"
          }
        },
        {
          "id": "calculateField",
          "options": {
            "alias": "domain_count",
            "mode": "reduceRow",
            "reduce": {
              "include": [
                "domain"
              ],
              "reducer": "count"
            },
            "replaceFields": false
          }
        },
        {
          "id": "filterByValue",
          "options": {
            "filters": [
              {
                "config": {
                  "id": "equal",
                  "options": {
                    "value": "${monitoring_ip}"
                  }
                },
                "fieldName": "ip"
              },
              {
                "config": {
                  "id": "regex",
                  "options": {
                    "value": "${monitoring_agent}"
                  }
                },
                "fieldName": "user_agent"
              }
            ],
            "match": "any",
            "type": "exclude"
          }
        },
        {
          "id": "groupBy",
          "options": {
            "fields": {
              "Cunt": {
                "aggregations": [
                  "count"
                ],
                "operation": "aggregate"
              },
              "Default": {
                "aggregations": [
                  "count"
                ],
                "operation": "aggregate"
              },
              "cunt": {
                "aggregations": [
                  "sum"
                ],
                "operation": "aggregate"
              },
              "domain": {
                "aggregations": [],
                "operation": "groupby"
              },
              "domain_count": {
                "aggregations": [
                  "count"
                ],
                "operation": "aggregate"
              },
              "domain_visit_count": {
                "aggregations": [
                  "count"
                ],
                "operation": "aggregate"
              }
            }
          }
        },
        {
          "id": "filterByValue",
          "options": {
            "filters": [
              {
                "config": {
                  "id": "isNull",
                  "options": {}
                },
                "fieldName": "domain"
              }
            ],
            "match": "all",
            "type": "exclude"
          }
        }
      ],
      "type": "piechart"
    },
    {
      "datasource": {
        "type": "loki",
        "uid": "P8E80F9AEF21F6940"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            }
          },
          "fieldMinMax": false,
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 20,
        "w": 13,
        "x": 0,
        "y": 8
      },
      "id": 2,
      "options": {
        "basemap": {
          "config": {
            "server": "streets",
            "showLabels": true,
            "theme": "auto"
          },
          "name": "Layer 0",
          "type": "default"
        },
        "controls": {
          "mouseWheelZoom": false,
          "showAttribution": true,
          "showDebug": false,
          "showMeasure": false,
          "showScale": false,
          "showZoom": true
        },
        "layers": [
          {
            "config": {
              "showLegend": false,
              "style": {
                "color": {
                  "fixed": "dark-green"
                },
                "opacity": 0.5,
                "rotation": {
                  "fixed": 0,
                  "max": 360,
                  "min": -360,
                  "mode": "mod"
                },
                "size": {
                  "fixed": 10,
                  "max": 15,
                  "min": 2
                },
                "symbol": {
                  "fixed": "img/icons/marker/circle.svg",
                  "mode": "fixed"
                },
                "symbolAlign": {
                  "horizontal": "center",
                  "vertical": "center"
                },
                "text": {
                  "fixed": "",
                  "mode": "field"
                },
                "textConfig": {
                  "fontSize": 12,
                  "offsetX": 0,
                  "offsetY": 0,
                  "textAlign": "center",
                  "textBaseline": "middle"
                }
              }
            },
            "filterData": {
              "id": "byRefId",
              "options": "A"
            },
            "location": {
              "gazetteer": "public/gazetteer/countries.json",
              "lookup": "country_code",
              "mode": "lookup"
            },
            "name": "Country",
            "opacity": 0.9,
            "tooltip": true,
            "type": "markers"
          }
        ],
        "tooltip": {
          "mode": "details"
        },
        "view": {
          "allLayers": true,
          "id": "zero",
          "lat": 0,
          "lon": 0,
          "noRepeat": false,
          "shared": false,
          "zoom": 2
        }
      },
      "pluginVersion": "12.3.2",
      "targets": [
        {
          "datasource": {
            "type": "loki",
            "uid": "P8E80F9AEF21F6940"
          },
          "direction": "backward",
          "editorMode": "code",
          "expr": "{filename=~\"/var/log/nginx/.*.log\", instance=\"$node\"}",
          "legendFormat": "",
          "maxLines": 99999,
          "queryType": "range",
          "refId": "A"
        }
      ],
      "title": "",
      "transformations": [
        {
          "id": "extractFields",
          "options": {
            "delimiter": ",",
            "format": "json",
            "jsonPaths": [],
            "keepTime": false,
            "replace": true,
            "source": "Line"
          }
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {},
            "includeByName": {},
            "indexByName": {
              "city": 2,
              "country_code": 4,
              "country_name": 3,
              "domain": 5,
              "ip": 0,
              "request": 6,
              "time_iso8601": 1
            },
            "renameByName": {}
          }
        },
        {
          "id": "filterByValue",
          "options": {
            "filters": [
              {
                "config": {
                  "id": "isNull",
                  "options": {}
                },
                "fieldName": "ip"
              }
            ],
            "match": "all",
            "type": "exclude"
          }
        },
        {
          "id": "filterByValue",
          "options": {
            "filters": [
              {
                "config": {
                  "id": "equal",
                  "options": {
                    "value": "${monitoring_ip}"
                  }
                },
                "fieldName": "ip"
              },
              {
                "config": {
                  "id": "regex",
                  "options": {
                    "value": "${monitoring_agent}"
                  }
                },
                "fieldName": "user_agent"
              }
            ],
            "match": "all",
            "type": "exclude"
          }
        }
      ],
      "type": "geomap"
    },
    {
      "datasource": {
        "type": "loki",
        "uid": "P8E80F9AEF21F6940"
      },
      "description": "With more than 3 requests to the same page.",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            }
          },
          "fieldMinMax": false,
          "mappings": [],
          "min": 0
        },
        "overrides": [
          {
            "__systemRef": "hideSeriesFrom",
            "matcher": {
              "id": "byNames",
              "options": {
                "mode": "exclude",
                "names": [
                  "row_count (count)",
                  "147.32.232.146 wiki.cvut.it GET / HTTP/1.1"
                ],
                "prefix": "All except:",
                "readOnly": true
              }
            },
            "properties": [
              {
                "id": "custom.hideFrom",
                "value": {
                  "legend": false,
                  "tooltip": true,
                  "viz": true
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 20,
        "w": 8,
        "x": 13,
        "y": 8
      },
      "id": 18,
      "options": {
        "displayLabels": [],
        "legend": {
          "displayMode": "table",
          "placement": "bottom",
          "showLegend": true,
          "values": [
            "percent",
            "value"
          ]
        },
        "pieType": "pie",
        "reduceOptions": {
          "calcs": [],
          "fields": "/^row_count \\(count\\)$/",
          "values": true
        },
        "sort": "desc",
        "tooltip": {
          "hideZeros": false,
          "mode": "single",
          "sort": "asc"
        }
      },
      "pluginVersion": "12.3.2",
      "targets": [
        {
          "datasource": {
            "type": "loki",
            "uid": "P8E80F9AEF21F6940"
          },
          "direction": "backward",
          "editorMode": "code",
          "expr": "{filename=~\"/var/log/nginx/.*.access.log\", instance=\"$node\"}",
          "legendFormat": "",
          "maxLines": 9999,
          "queryType": "range",
          "refId": "A"
        }
      ],
      "title": "Visits by source ip / domain / page",
      "transformations": [
        {
          "id": "extractFields",
          "options": {
            "delimiter": ",",
            "format": "json",
            "jsonPaths": [],
            "keepTime": false,
            "replace": true,
            "source": "Line"
          }
        },
        {
          "id": "calculateField",
          "options": {
            "alias": "row_count",
            "mode": "reduceRow",
            "reduce": {
              "include": [
                "request"
              ],
              "reducer": "count"
            },
            "replaceFields": false
          }
        },
        {
          "id": "filterByValue",
          "options": {
            "filters": [
              {
                "config": {
                  "id": "equal",
                  "options": {
                    "value": "${monitoring_ip}"
                  }
                },
                "fieldName": "ip"
              },
              {
                "config": {
                  "id": "regex",
                  "options": {
                    "value": "${monitoring_agent}"
                  }
                },
                "fieldName": "user_agent"
              }
            ],
            "match": "all",
            "type": "exclude"
          }
        },
        {
          "id": "groupBy",
          "options": {
            "fields": {
              "Cunt": {
                "aggregations": [
                  "count"
                ],
                "operation": "aggregate"
              },
              "Default": {
                "aggregations": [
                  "count"
                ],
                "operation": "aggregate"
              },
              "country_code": {
                "aggregations": []
              },
              "cunt": {
                "aggregations": [
                  "sum"
                ],
                "operation": "aggregate"
              },
              "domain": {
                "aggregations": [],
                "operation": "groupby"
              },
              "domain_count": {
                "aggregations": [
                  "count"
                ],
                "operation": "aggregate"
              },
              "domain_visit_count": {
                "aggregations": [
                  "count"
                ],
                "operation": "aggregate"
              },
              "ip": {
                "aggregations": [],
                "operation": "groupby"
              },
              "ip_count": {
                "aggregations": [
                  "count"
                ],
                "operation": "aggregate"
              },
              "request": {
                "aggregations": [],
                "operation": "groupby"
              },
              "row_count": {
                "aggregations": [
                  "count"
                ],
                "operation": "aggregate"
              },
              "user_agent": {
                "aggregations": []
              }
            }
          }
        },
        {
          "id": "filterByValue",
          "options": {
            "filters": [
              {
                "config": {
                  "id": "isNotNull",
                  "options": {}
                },
                "fieldName": "ip"
              },
              {
                "config": {
                  "id": "greater",
                  "options": {
                    "value": "3"
                  }
                },
                "fieldName": "row_count (count)"
              }
            ],
            "match": "all",
            "type": "include"
          }
        }
      ],
      "type": "piechart"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "PBFA97CFB590B2093"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 6,
        "w": 3,
        "x": 21,
        "y": 8
      },
      "id": 6,
      "options": {
        "minVizHeight": 75,
        "minVizWidth": 75,
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "showThresholdLabels": false,
        "showThresholdMarkers": true,
        "sizing": "auto"
      },
      "pluginVersion": "12.3.2",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "PBFA97CFB590B2093"
          },
          "disableTextWrap": false,
          "editorMode": "code",
          "exemplar": false,
          "expr": "nginx_connections_reading{instance=~\"$node.*\"}",
          "format": "time_series",
          "fullMetaSearch": false,
          "includeNullMetadata": true,
          "instant": false,
          "legendFormat": "{{instance}}",
          "range": true,
          "refId": "A",
          "useBackend": false
        }
      ],
      "title": "Connections where NGINX is reading the request header.",
      "type": "gauge"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "PBFA97CFB590B2093"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 6,
        "w": 3,
        "x": 21,
        "y": 14
      },
      "id": 8,
      "options": {
        "minVizHeight": 75,
        "minVizWidth": 75,
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "showThresholdLabels": false,
        "showThresholdMarkers": true,
        "sizing": "auto"
      },
      "pluginVersion": "12.3.2",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "PBFA97CFB590B2093"
          },
          "disableTextWrap": false,
          "editorMode": "code",
          "exemplar": false,
          "expr": "nginx_connections_writing{instance=~\"$node.*\"}",
          "format": "time_series",
          "fullMetaSearch": false,
          "includeNullMetadata": true,
          "instant": false,
          "legendFormat": "{{instance}}",
          "range": true,
          "refId": "A",
          "useBackend": false
        }
      ],
      "title": "Connections where NGINX is writing the response back to the client.",
      "type": "gauge"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "PBFA97CFB590B2093"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 3,
        "x": 21,
        "y": 20
      },
      "id": 7,
      "options": {
        "minVizHeight": 75,
        "minVizWidth": 75,
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "showThresholdLabels": false,
        "showThresholdMarkers": true,
        "sizing": "auto"
      },
      "pluginVersion": "12.3.2",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "PBFA97CFB590B2093"
          },
          "disableTextWrap": false,
          "editorMode": "code",
          "exemplar": false,
          "expr": "nginx_connections_waiting{instance=~\"$node.*\"}",
          "format": "time_series",
          "fullMetaSearch": false,
          "includeNullMetadata": true,
          "instant": false,
          "legendFormat": "{{instance}}",
          "range": true,
          "refId": "A",
          "useBackend": false
        }
      ],
      "title": " \tIdle client connections.",
      "type": "gauge"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "PBFA97CFB590B2093"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisBorderShow": false,
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "barWidthFactor": 0.6,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "insertNulls": false,
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "showValues": false,
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 9,
        "w": 6,
        "x": 0,
        "y": 28
      },
      "id": 4,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "hideZeros": false,
          "mode": "single",
          "sort": "none"
        }
      },
      "pluginVersion": "12.3.2",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "PBFA97CFB590B2093"
          },
          "disableTextWrap": false,
          "editorMode": "code",
          "exemplar": false,
          "expr": "nginx_connections_active{instance=~\"$node.*\"}",
          "format": "time_series",
          "fullMetaSearch": false,
          "includeNullMetadata": true,
          "instant": false,
          "legendFormat": "{{instance}}",
          "range": true,
          "refId": "A",
          "useBackend": false
        }
      ],
      "title": "Active client connections.",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "PBFA97CFB590B2093"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisBorderShow": false,
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "barWidthFactor": 0.6,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "insertNulls": false,
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "showValues": false,
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 9,
        "w": 6,
        "x": 6,
        "y": 28
      },
      "id": 3,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "hideZeros": false,
          "mode": "single",
          "sort": "none"
        }
      },
      "pluginVersion": "12.3.2",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "PBFA97CFB590B2093"
          },
          "disableTextWrap": false,
          "editorMode": "code",
          "exemplar": false,
          "expr": "rate(nginx_connections_accepted{instance=~\"$node.*\"}[$__rate_interval])",
          "format": "time_series",
          "fullMetaSearch": false,
          "includeNullMetadata": true,
          "instant": false,
          "legendFormat": "{{instance}}",
          "range": true,
          "refId": "A",
          "useBackend": false
        }
      ],
      "title": "Accepted client connections",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "PBFA97CFB590B2093"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisBorderShow": false,
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "barWidthFactor": 0.6,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "insertNulls": false,
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "showValues": false,
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 9,
        "w": 6,
        "x": 12,
        "y": 28
      },
      "id": 9,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "hideZeros": false,
          "mode": "single",
          "sort": "none"
        }
      },
      "pluginVersion": "12.3.2",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "PBFA97CFB590B2093"
          },
          "disableTextWrap": false,
          "editorMode": "code",
          "exemplar": false,
          "expr": "rate(nginx_http_requests_total{instance=~\"$node.*\"}[$__rate_interval])",
          "format": "time_series",
          "fullMetaSearch": false,
          "includeNullMetadata": true,
          "instant": false,
          "legendFormat": "{{instance}}",
          "range": true,
          "refId": "A",
          "useBackend": false
        }
      ],
      "title": "Total http requests.",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "PBFA97CFB590B2093"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisBorderShow": false,
            "axisCenteredZero": false,
            "axisColorMode": "text",
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "barWidthFactor": 0.6,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "insertNulls": false,
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "showValues": false,
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 9,
        "w": 6,
        "x": 18,
        "y": 28
      },
      "id": 5,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true
        },
        "tooltip": {
          "hideZeros": false,
          "mode": "single",
          "sort": "none"
        }
      },
      "pluginVersion": "12.3.2",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "PBFA97CFB590B2093"
          },
          "disableTextWrap": false,
          "editorMode": "code",
          "exemplar": false,
          "expr": "rate(nginx_connections_handled{instance=~\"$node.*\"}[$__rate_interval])",
          "format": "time_series",
          "fullMetaSearch": false,
          "includeNullMetadata": true,
          "instant": false,
          "legendFormat": "{{instance}}",
          "range": true,
          "refId": "A",
          "useBackend": false
        }
      ],
      "title": "Handled client connections.",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "loki",
        "uid": "P8E80F9AEF21F6940"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "auto",
            "cellOptions": {
              "type": "auto"
            },
            "filterable": true,
            "footer": {
              "reducers": []
            },
            "inspect": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": 0
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 12,
        "w": 24,
        "x": 0,
        "y": 37
      },
      "id": 1,
      "options": {
        "cellHeight": "sm",
        "enablePagination": false,
        "frameIndex": 0,
        "showHeader": true,
        "sortBy": []
      },
      "pluginVersion": "12.3.2",
      "targets": [
        {
          "datasource": {
            "type": "loki",
            "uid": "P8E80F9AEF21F6940"
          },
          "direction": "backward",
          "editorMode": "code",
          "expr": "{filename=~\"/var/log/nginx/.*.access.log\", instance=\"$node\"}",
          "legendFormat": "",
          "maxLines": 99999,
          "queryType": "range",
          "refId": "A"
        }
      ],
      "title": "Logs",
      "transformations": [
        {
          "id": "extractFields",
          "options": {
            "delimiter": ",",
            "format": "json",
            "keepTime": false,
            "replace": true,
            "source": "Line"
          }
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "Line": true,
              "Time": false,
              "city": false,
              "country_code": false,
              "country_name": false,
              "detected_level": true,
              "filename": false,
              "id": true,
              "instance": true,
              "ip": false,
              "job": false,
              "labelTypes": true,
              "labels": true,
              "request": false,
              "service_name": true,
              "time_iso8601": false,
              "tsNs": true
            },
            "includeByName": {},
            "indexByName": {
              "city": 4,
              "country_code": 6,
              "country_name": 3,
              "domain": 5,
              "ip": 1,
              "request": 2,
              "time_iso8601": 0
            },
            "renameByName": {}
          }
        },
        {
          "id": "filterByValue",
          "options": {
            "filters": [
              {
                "config": {
                  "id": "isNull",
                  "options": {}
                },
                "fieldName": "time_iso8601"
              }
            ],
            "match": "all",
            "type": "exclude"
          }
        },
        {
          "id": "filterByValue",
          "options": {
            "filters": [
              {
                "config": {
                  "id": "equal",
                  "options": {
                    "value": "${monitoring_ip}"
                  }
                },
                "fieldName": "ip"
              },
              {
                "config": {
                  "id": "regex",
                  "options": {
                    "value": "${monitoring_agent}"
                  }
                },
                "fieldName": "user_agent"
              }
            ],
            "match": "all",
            "type": "exclude"
          }
        }
      ],
      "type": "table"
    }
  ],
  "preload": true,
  "refresh": "",
  "schemaVersion": 42,
  "tags": [
    "nginx",
    "linux"
  ],
  "templating": {
    "list": [
      {
        "allowCustomValue": false,
        "current": {
          "text": "cvut.it-1.in.cvut.it",
          "value": "cvut.it-1.in.cvut.it"
        },
        "datasource": {
          "type": "loki",
          "uid": "P8E80F9AEF21F6940"
        },
        "definition": "",
        "description": "instance",
        "includeAll": false,
        "label": "Host",
        "name": "node",
        "options": [],
        "query": {
          "label": "instance",
          "refId": "LokiVariableQueryEditor-VariableQuery",
          "stream": "",
          "type": 1
        },
        "refresh": 1,
        "regex": ".*[.].*",
        "sort": 1,
        "type": "query"
      },
      {
        "allowCustomValue": false,
        "current": {
          "text": "147.32.232.146",
          "value": "147.32.232.146"
        },
        "hide": 2,
        "name": "monitoring_ip",
        "options": [
          {
            "selected": true,
            "text": "147.32.232.146",
            "value": "147.32.232.146"
          }
        ],
        "query": "147.32.232.146",
        "type": "custom"
      },
      {
        "allowCustomValue": false,
        "current": {
          "text": "Uptime-Kuma",
          "value": "Uptime-Kuma"
        },
        "description": "",
        "hide": 2,
        "name": "monitoring_agent",
        "options": [
          {
            "selected": true,
            "text": "Uptime-Kuma",
            "value": "Uptime-Kuma"
          }
        ],
        "query": "Uptime-Kuma",
        "type": "custom"
      }
    ]
  },
  "time": {
    "from": "now-24h",
    "to": "now"
  },
  "timepicker": {},
  "timezone": "browser",
  "title": "nginx",
  "uid": "fedq6uh4lx8u8d",
  "version": 9
}