1681 lines
39 KiB
JSON
1681 lines
39 KiB
JSON
{
|
|
"annotations": {
|
|
"list": [
|
|
{
|
|
"builtIn": 1,
|
|
"datasource": {
|
|
"type": "datasource",
|
|
"uid": "grafana"
|
|
},
|
|
"enable": true,
|
|
"hide": true,
|
|
"iconColor": "rgba(0, 211, 255, 1)",
|
|
"name": "Annotations & Alerts",
|
|
"type": "dashboard"
|
|
}
|
|
]
|
|
},
|
|
"description": "Loki version 2 showcase using JSON NGINX access logs.",
|
|
"editable": true,
|
|
"fiscalYearStartMonth": 0,
|
|
"gnetId": 13740,
|
|
"graphTooltip": 0,
|
|
"id": 5,
|
|
"links": [],
|
|
"liveNow": false,
|
|
"panels": [
|
|
{
|
|
"collapsed": false,
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "c0696081-8d61-4fbd-bde3-6510cbc6b07f"
|
|
},
|
|
"gridPos": {
|
|
"h": 1,
|
|
"w": 24,
|
|
"x": 0,
|
|
"y": 0
|
|
},
|
|
"id": 24,
|
|
"panels": [],
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "c0696081-8d61-4fbd-bde3-6510cbc6b07f"
|
|
},
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "KPI's",
|
|
"type": "row"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "c0696081-8d61-4fbd-bde3-6510cbc6b07f"
|
|
},
|
|
"description": "",
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "purple",
|
|
"value": null
|
|
}
|
|
]
|
|
},
|
|
"unit": "short"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"gridPos": {
|
|
"h": 4,
|
|
"w": 6,
|
|
"x": 0,
|
|
"y": 1
|
|
},
|
|
"id": 4,
|
|
"interval": "30s",
|
|
"options": {
|
|
"colorMode": "background",
|
|
"graphMode": "area",
|
|
"justifyMode": "center",
|
|
"orientation": "auto",
|
|
"reduceOptions": {
|
|
"calcs": [
|
|
"sum"
|
|
],
|
|
"fields": "",
|
|
"values": false
|
|
},
|
|
"textMode": "value"
|
|
},
|
|
"pluginVersion": "10.2.0",
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "c0696081-8d61-4fbd-bde3-6510cbc6b07f"
|
|
},
|
|
"editorMode": "code",
|
|
"expr": "sum by(host) (count_over_time({filename=\"/var/log/nginx/json_access.log\", host=\"$host\"} !~ `10.10.*.*` [$__interval])) ",
|
|
"legendFormat": "",
|
|
"queryType": "range",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "Total requests ",
|
|
"transformations": [],
|
|
"type": "stat"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "c0696081-8d61-4fbd-bde3-6510cbc6b07f"
|
|
},
|
|
"description": "",
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "light-blue",
|
|
"value": null
|
|
}
|
|
]
|
|
},
|
|
"unit": "short"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"gridPos": {
|
|
"h": 8,
|
|
"w": 9,
|
|
"x": 6,
|
|
"y": 1
|
|
},
|
|
"id": 5,
|
|
"interval": "30s",
|
|
"options": {
|
|
"colorMode": "background",
|
|
"graphMode": "area",
|
|
"justifyMode": "auto",
|
|
"orientation": "auto",
|
|
"reduceOptions": {
|
|
"calcs": [
|
|
"sum"
|
|
],
|
|
"fields": "",
|
|
"values": false
|
|
},
|
|
"textMode": "auto"
|
|
},
|
|
"pluginVersion": "10.2.0",
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "c0696081-8d61-4fbd-bde3-6510cbc6b07f"
|
|
},
|
|
"editorMode": "code",
|
|
"expr": "sum by (status) (count_over_time({filename=\"/var/log/nginx/json_access.log\", host=\"$host\"} !~ `10.10.*.*` | json | __error__=\"\" [$__interval]))",
|
|
"legendFormat": "HTTP Status: {{status}}",
|
|
"queryType": "range",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "Requests per status code",
|
|
"transformations": [],
|
|
"type": "stat"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "c0696081-8d61-4fbd-bde3-6510cbc6b07f"
|
|
},
|
|
"description": "",
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"mappings": [],
|
|
"max": 100,
|
|
"min": 0,
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "purple",
|
|
"value": null
|
|
},
|
|
{
|
|
"color": "red",
|
|
"value": 80
|
|
}
|
|
]
|
|
},
|
|
"unit": "percent"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"gridPos": {
|
|
"h": 4,
|
|
"w": 5,
|
|
"x": 15,
|
|
"y": 1
|
|
},
|
|
"id": 19,
|
|
"links": [],
|
|
"maxDataPoints": 1,
|
|
"options": {
|
|
"colorMode": "background",
|
|
"graphMode": "none",
|
|
"justifyMode": "center",
|
|
"orientation": "auto",
|
|
"reduceOptions": {
|
|
"calcs": [
|
|
"mean"
|
|
],
|
|
"fields": "",
|
|
"values": false
|
|
},
|
|
"textMode": "value"
|
|
},
|
|
"pluginVersion": "10.2.0",
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "c0696081-8d61-4fbd-bde3-6510cbc6b07f"
|
|
},
|
|
"editorMode": "code",
|
|
"expr": " sum(rate({filename=\"/var/log/nginx/json_access.log\", host=\"$host\"} | json | status >= 500 |__error__=\"\"[$__interval])) / (sum(rate({filename=\"/var/log/nginx/json_access.log\", host=\"$host\"} !~ `10.10.*.*` | json | __error__=\"\"[$__interval])) / 100)",
|
|
"legendFormat": "",
|
|
"queryType": "range",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "% of 5xx requests ",
|
|
"type": "stat"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "c0696081-8d61-4fbd-bde3-6510cbc6b07f"
|
|
},
|
|
"description": "",
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"mappings": [],
|
|
"max": 100,
|
|
"min": 0,
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "purple",
|
|
"value": null
|
|
}
|
|
]
|
|
},
|
|
"unit": "percent"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"gridPos": {
|
|
"h": 4,
|
|
"w": 4,
|
|
"x": 20,
|
|
"y": 1
|
|
},
|
|
"id": 18,
|
|
"interval": "10m",
|
|
"links": [],
|
|
"maxDataPoints": 1,
|
|
"options": {
|
|
"colorMode": "background",
|
|
"graphMode": "none",
|
|
"justifyMode": "auto",
|
|
"orientation": "auto",
|
|
"reduceOptions": {
|
|
"calcs": [
|
|
"last"
|
|
],
|
|
"fields": "",
|
|
"values": false
|
|
},
|
|
"textMode": "value"
|
|
},
|
|
"pluginVersion": "10.2.0",
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "c0696081-8d61-4fbd-bde3-6510cbc6b07f"
|
|
},
|
|
"editorMode": "code",
|
|
"expr": " sum(rate(({job=\"nginx_access_log\", host=\"$host\"} !~ `10.10.*.*` |= \"Googlebot\")[$__interval])) / (sum(rate(({job=\"nginx_access_log\", host=\"$host\"} != \"Googlebot\")[$__interval])) / 100)",
|
|
"legendFormat": "",
|
|
"queryType": "range",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "% of requests by Googlebot",
|
|
"type": "stat"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "c0696081-8d61-4fbd-bde3-6510cbc6b07f"
|
|
},
|
|
"description": "",
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "purple",
|
|
"value": null
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"overrides": []
|
|
},
|
|
"gridPos": {
|
|
"h": 4,
|
|
"w": 6,
|
|
"x": 0,
|
|
"y": 5
|
|
},
|
|
"id": 22,
|
|
"interval": "5m",
|
|
"options": {
|
|
"colorMode": "background",
|
|
"graphMode": "none",
|
|
"justifyMode": "auto",
|
|
"orientation": "auto",
|
|
"reduceOptions": {
|
|
"calcs": [
|
|
"mean"
|
|
],
|
|
"fields": "",
|
|
"values": false
|
|
},
|
|
"textMode": "value"
|
|
},
|
|
"pluginVersion": "10.2.0",
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "c0696081-8d61-4fbd-bde3-6510cbc6b07f"
|
|
},
|
|
"expr": "count(sum by (remote_addr) (count_over_time({filename=\"/var/log/nginx/json_access.log\", host=\"$host\"} | json | __error__=\"\" [5m])))",
|
|
"legendFormat": "",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "Users right now",
|
|
"transformations": [],
|
|
"type": "stat"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "c0696081-8d61-4fbd-bde3-6510cbc6b07f"
|
|
},
|
|
"description": "",
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "purple",
|
|
"value": null
|
|
}
|
|
]
|
|
},
|
|
"unit": "decbytes"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"gridPos": {
|
|
"h": 4,
|
|
"w": 9,
|
|
"x": 15,
|
|
"y": 5
|
|
},
|
|
"id": 8,
|
|
"interval": "10m",
|
|
"options": {
|
|
"colorMode": "background",
|
|
"graphMode": "none",
|
|
"justifyMode": "center",
|
|
"orientation": "auto",
|
|
"reduceOptions": {
|
|
"calcs": [
|
|
"sum"
|
|
],
|
|
"fields": "",
|
|
"values": false
|
|
},
|
|
"textMode": "value"
|
|
},
|
|
"pluginVersion": "10.2.0",
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "c0696081-8d61-4fbd-bde3-6510cbc6b07f"
|
|
},
|
|
"editorMode": "code",
|
|
"expr": "sum by (host) (sum_over_time({filename=\"/var/log/nginx/json_access.log\", host=\"$host\"} !~ `10.10.*.*` | json | status=200 | unwrap body_bytes_sent | __error__=\"\" [$__interval]))",
|
|
"legendFormat": "Bytes sent",
|
|
"queryType": "range",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "Total Bytes Sent",
|
|
"transformations": [
|
|
{
|
|
"id": "reduce",
|
|
"options": {
|
|
"reducers": [
|
|
"sum"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"id": "organize",
|
|
"options": {
|
|
"excludeByName": {},
|
|
"indexByName": {},
|
|
"renameByName": {
|
|
"Total": "Bytes Sent"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"type": "stat"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "c0696081-8d61-4fbd-bde3-6510cbc6b07f"
|
|
},
|
|
"description": "",
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"color": {
|
|
"mode": "thresholds"
|
|
},
|
|
"custom": {
|
|
"hideFrom": {
|
|
"legend": false,
|
|
"tooltip": false,
|
|
"viz": false
|
|
}
|
|
},
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "#96D98D",
|
|
"value": null
|
|
},
|
|
{
|
|
"color": "#37872D",
|
|
"value": 5
|
|
},
|
|
{
|
|
"color": "#19730E",
|
|
"value": 10
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"overrides": []
|
|
},
|
|
"gridPos": {
|
|
"h": 10,
|
|
"w": 15,
|
|
"x": 0,
|
|
"y": 9
|
|
},
|
|
"id": 14,
|
|
"interval": "30s",
|
|
"maxDataPoints": 1,
|
|
"options": {
|
|
"basemap": {
|
|
"name": "Basemap",
|
|
"type": "default"
|
|
},
|
|
"controls": {
|
|
"mouseWheelZoom": true,
|
|
"showAttribution": true,
|
|
"showDebug": false,
|
|
"showMeasure": false,
|
|
"showScale": false,
|
|
"showZoom": true
|
|
},
|
|
"layers": [
|
|
{
|
|
"config": {
|
|
"blur": 15,
|
|
"radius": 5,
|
|
"weight": {
|
|
"fixed": 1,
|
|
"max": 1,
|
|
"min": 0
|
|
}
|
|
},
|
|
"location": {
|
|
"latitude": "geoip_location_latitude",
|
|
"longitude": "geoip_location_longitude",
|
|
"mode": "coords"
|
|
},
|
|
"name": "Layer 0",
|
|
"tooltip": true,
|
|
"type": "heatmap"
|
|
}
|
|
],
|
|
"tooltip": {
|
|
"mode": "details"
|
|
},
|
|
"view": {
|
|
"allLayers": true,
|
|
"id": "zero",
|
|
"lat": 0,
|
|
"lon": 0,
|
|
"zoom": 2
|
|
}
|
|
},
|
|
"pluginVersion": "10.2.0",
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "c0696081-8d61-4fbd-bde3-6510cbc6b07f"
|
|
},
|
|
"editorMode": "code",
|
|
"expr": "{filename=\"/var/log/nginx/json_access.log\"} | json | geoip_continent_code != \"\" | geoip_location_longitude != \"\" | geoip_location_latitude != \"\"",
|
|
"legendFormat": "{{geoip_country_code}}",
|
|
"queryType": "range",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "Countrie",
|
|
"transformations": [
|
|
{
|
|
"id": "extractFields",
|
|
"options": {
|
|
"format": "kvp",
|
|
"replace": true,
|
|
"source": "labels"
|
|
}
|
|
},
|
|
{
|
|
"id": "convertFieldType",
|
|
"options": {
|
|
"conversions": [
|
|
{
|
|
"destinationType": "number",
|
|
"targetField": "geoip_location_latitude"
|
|
},
|
|
{
|
|
"destinationType": "number",
|
|
"targetField": "geoip_location_longitude"
|
|
}
|
|
],
|
|
"fields": {}
|
|
}
|
|
}
|
|
],
|
|
"type": "geomap"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "c0696081-8d61-4fbd-bde3-6510cbc6b07f"
|
|
},
|
|
"description": "",
|
|
"gridPos": {
|
|
"h": 10,
|
|
"w": 9,
|
|
"x": 15,
|
|
"y": 9
|
|
},
|
|
"id": 11,
|
|
"options": {
|
|
"dedupStrategy": "none",
|
|
"enableLogDetails": true,
|
|
"prettifyLogMessage": false,
|
|
"showCommonLabels": false,
|
|
"showLabels": false,
|
|
"showTime": false,
|
|
"sortOrder": "Descending",
|
|
"wrapLogMessage": false
|
|
},
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "c0696081-8d61-4fbd-bde3-6510cbc6b07f"
|
|
},
|
|
"editorMode": "code",
|
|
"expr": "{filename=\"/var/log/nginx/json_access.log\", host=\"$host\"} !~ `10.10.*.*` | json | line_format \"request for {{.request_uri}} with HTTP status: {{.status}} \"",
|
|
"legendFormat": "",
|
|
"queryType": "range",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "Recent requests",
|
|
"type": "logs"
|
|
},
|
|
{
|
|
"collapsed": false,
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "c0696081-8d61-4fbd-bde3-6510cbc6b07f"
|
|
},
|
|
"gridPos": {
|
|
"h": 1,
|
|
"w": 24,
|
|
"x": 0,
|
|
"y": 19
|
|
},
|
|
"id": 26,
|
|
"panels": [],
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "c0696081-8d61-4fbd-bde3-6510cbc6b07f"
|
|
},
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "Request statistics over time",
|
|
"type": "row"
|
|
},
|
|
{
|
|
"aliasColors": {
|
|
"95th percentile": "blue",
|
|
"max latency": "super-light-blue"
|
|
},
|
|
"bars": false,
|
|
"dashLength": 10,
|
|
"dashes": false,
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "c0696081-8d61-4fbd-bde3-6510cbc6b07f"
|
|
},
|
|
"description": "",
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"unit": "s"
|
|
},
|
|
"overrides": []
|
|
},
|
|
"fill": 5,
|
|
"fillGradient": 9,
|
|
"gridPos": {
|
|
"h": 9,
|
|
"w": 7,
|
|
"x": 0,
|
|
"y": 20
|
|
},
|
|
"hiddenSeries": false,
|
|
"id": 16,
|
|
"interval": "30s",
|
|
"legend": {
|
|
"avg": false,
|
|
"current": false,
|
|
"max": false,
|
|
"min": false,
|
|
"show": true,
|
|
"total": false,
|
|
"values": false
|
|
},
|
|
"lines": true,
|
|
"linewidth": 1,
|
|
"nullPointMode": "null",
|
|
"options": {
|
|
"alertThreshold": true
|
|
},
|
|
"percentage": false,
|
|
"pluginVersion": "10.2.0",
|
|
"pointradius": 2,
|
|
"points": false,
|
|
"renderer": "flot",
|
|
"seriesOverrides": [
|
|
{
|
|
"$$hashKey": "object:232",
|
|
"alias": "max latency",
|
|
"dashes": true,
|
|
"fillGradient": 3
|
|
}
|
|
],
|
|
"spaceLength": 10,
|
|
"stack": false,
|
|
"steppedLine": false,
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "c0696081-8d61-4fbd-bde3-6510cbc6b07f"
|
|
},
|
|
"editorMode": "code",
|
|
"expr": "quantile_over_time(0.95,{filename=\"/var/log/nginx/json_access.log\", host=\"$host\"} !~ `10.10.*.*` | json | unwrap request_time | __error__=\"\" [$__interval]) by (host)",
|
|
"legendFormat": "95th percentile",
|
|
"queryType": "range",
|
|
"refId": "C"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "c0696081-8d61-4fbd-bde3-6510cbc6b07f"
|
|
},
|
|
"expr": "max by (host) (max_over_time({filename=\"/var/log/nginx/json_access.log\", host=\"$host\"} | json | unwrap request_time | __error__=\"\" [$__interval]))",
|
|
"legendFormat": "max latency",
|
|
"refId": "D"
|
|
}
|
|
],
|
|
"thresholds": [
|
|
{
|
|
"$$hashKey": "object:168",
|
|
"colorMode": "critical",
|
|
"fill": true,
|
|
"line": true,
|
|
"op": "gt",
|
|
"value": 0.3,
|
|
"yaxis": "left"
|
|
}
|
|
],
|
|
"timeRegions": [],
|
|
"title": "95th percentile of Request Time",
|
|
"tooltip": {
|
|
"shared": true,
|
|
"sort": 0,
|
|
"value_type": "individual"
|
|
},
|
|
"type": "graph",
|
|
"xaxis": {
|
|
"mode": "time",
|
|
"show": true,
|
|
"values": []
|
|
},
|
|
"yaxes": [
|
|
{
|
|
"$$hashKey": "object:178",
|
|
"format": "s",
|
|
"logBase": 1,
|
|
"show": true
|
|
},
|
|
{
|
|
"$$hashKey": "object:179",
|
|
"format": "short",
|
|
"logBase": 1,
|
|
"show": false
|
|
}
|
|
],
|
|
"yaxis": {
|
|
"align": false
|
|
}
|
|
},
|
|
{
|
|
"aliasColors": {
|
|
"{statuscode=\"200\"} 200": "green",
|
|
"{statuscode=\"404\"} 404": "semi-dark-purple",
|
|
"{statuscode=\"500\"} 500": "dark-red"
|
|
},
|
|
"bars": false,
|
|
"dashLength": 10,
|
|
"dashes": false,
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "c0696081-8d61-4fbd-bde3-6510cbc6b07f"
|
|
},
|
|
"description": "",
|
|
"fill": 1,
|
|
"fillGradient": 10,
|
|
"gridPos": {
|
|
"h": 9,
|
|
"w": 9,
|
|
"x": 7,
|
|
"y": 20
|
|
},
|
|
"hiddenSeries": false,
|
|
"id": 2,
|
|
"interval": "30s",
|
|
"legend": {
|
|
"avg": false,
|
|
"current": false,
|
|
"max": false,
|
|
"min": false,
|
|
"show": true,
|
|
"total": false,
|
|
"values": false
|
|
},
|
|
"lines": true,
|
|
"linewidth": 1,
|
|
"nullPointMode": "connected",
|
|
"options": {
|
|
"alertThreshold": true
|
|
},
|
|
"percentage": true,
|
|
"pluginVersion": "10.2.0",
|
|
"pointradius": 2,
|
|
"points": false,
|
|
"renderer": "flot",
|
|
"seriesOverrides": [],
|
|
"spaceLength": 10,
|
|
"stack": true,
|
|
"steppedLine": false,
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "c0696081-8d61-4fbd-bde3-6510cbc6b07f"
|
|
},
|
|
"editorMode": "code",
|
|
"expr": "sum by (status) (count_over_time({filename=\"/var/log/nginx/json_access.log\", host=\"$host\"} !~ `10.10.*.*` | json | __error__=\"\" [$__interval]))",
|
|
"legendFormat": "HTTP Status {{status}}",
|
|
"queryType": "range",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"thresholds": [],
|
|
"timeRegions": [],
|
|
"title": "HTTP requests",
|
|
"tooltip": {
|
|
"shared": true,
|
|
"sort": 0,
|
|
"value_type": "individual"
|
|
},
|
|
"transformations": [
|
|
{
|
|
"id": "filterFieldsByName",
|
|
"options": {
|
|
"include": {
|
|
"names": [
|
|
"Time",
|
|
"HTTP Status 200",
|
|
"HTTP Status 301",
|
|
"HTTP Status 304",
|
|
"HTTP Status 404",
|
|
"HTTP Status 406",
|
|
"HTTP Status 500"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"type": "graph",
|
|
"xaxis": {
|
|
"mode": "time",
|
|
"show": true,
|
|
"values": []
|
|
},
|
|
"yaxes": [
|
|
{
|
|
"$$hashKey": "object:271",
|
|
"decimals": 0,
|
|
"format": "short",
|
|
"logBase": 1,
|
|
"max": "100",
|
|
"show": true
|
|
},
|
|
{
|
|
"$$hashKey": "object:272",
|
|
"format": "short",
|
|
"logBase": 1,
|
|
"show": true
|
|
}
|
|
],
|
|
"yaxis": {
|
|
"align": false
|
|
}
|
|
},
|
|
{
|
|
"aliasColors": {
|
|
"Bytes sent": "light-blue",
|
|
"appfelstrudel": "yellow"
|
|
},
|
|
"bars": false,
|
|
"dashLength": 10,
|
|
"dashes": false,
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "c0696081-8d61-4fbd-bde3-6510cbc6b07f"
|
|
},
|
|
"description": "",
|
|
"fill": 10,
|
|
"fillGradient": 10,
|
|
"gridPos": {
|
|
"h": 9,
|
|
"w": 8,
|
|
"x": 16,
|
|
"y": 20
|
|
},
|
|
"hiddenSeries": false,
|
|
"id": 9,
|
|
"interval": "30s",
|
|
"legend": {
|
|
"avg": false,
|
|
"current": false,
|
|
"max": false,
|
|
"min": false,
|
|
"show": true,
|
|
"total": false,
|
|
"values": false
|
|
},
|
|
"lines": true,
|
|
"linewidth": 1,
|
|
"nullPointMode": "null",
|
|
"options": {
|
|
"alertThreshold": true
|
|
},
|
|
"percentage": false,
|
|
"pluginVersion": "10.2.0",
|
|
"pointradius": 2,
|
|
"points": false,
|
|
"renderer": "flot",
|
|
"seriesOverrides": [],
|
|
"spaceLength": 10,
|
|
"stack": false,
|
|
"steppedLine": false,
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "c0696081-8d61-4fbd-bde3-6510cbc6b07f"
|
|
},
|
|
"editorMode": "code",
|
|
"expr": "sum by (host) (sum_over_time({filename=\"/var/log/nginx/json_access.log\", host=\"$host\"} !~ `10.10.*.*` | json | status=200 | unwrap body_bytes_sent | __error__=\"\" [$__interval]))",
|
|
"legendFormat": "Bytes sent",
|
|
"queryType": "range",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"thresholds": [],
|
|
"timeRegions": [],
|
|
"title": "Bytes Sent",
|
|
"tooltip": {
|
|
"shared": true,
|
|
"sort": 0,
|
|
"value_type": "individual"
|
|
},
|
|
"transformations": [],
|
|
"type": "graph",
|
|
"xaxis": {
|
|
"mode": "time",
|
|
"show": true,
|
|
"values": []
|
|
},
|
|
"yaxes": [
|
|
{
|
|
"$$hashKey": "object:72",
|
|
"format": "decbytes",
|
|
"logBase": 1,
|
|
"show": true
|
|
},
|
|
{
|
|
"$$hashKey": "object:73",
|
|
"format": "short",
|
|
"logBase": 1,
|
|
"show": true
|
|
}
|
|
],
|
|
"yaxis": {
|
|
"align": false
|
|
}
|
|
},
|
|
{
|
|
"collapsed": false,
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "c0696081-8d61-4fbd-bde3-6510cbc6b07f"
|
|
},
|
|
"gridPos": {
|
|
"h": 1,
|
|
"w": 24,
|
|
"x": 0,
|
|
"y": 29
|
|
},
|
|
"id": 28,
|
|
"panels": [],
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "c0696081-8d61-4fbd-bde3-6510cbc6b07f"
|
|
},
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "Acquisition and Behaviour",
|
|
"type": "row"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "c0696081-8d61-4fbd-bde3-6510cbc6b07f"
|
|
},
|
|
"description": "",
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"custom": {
|
|
"align": "auto",
|
|
"cellOptions": {
|
|
"type": "auto"
|
|
},
|
|
"filterable": false,
|
|
"inspect": false
|
|
},
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green"
|
|
},
|
|
{
|
|
"color": "red",
|
|
"value": 80
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"overrides": [
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Requests"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "custom.width",
|
|
"value": 300
|
|
},
|
|
{
|
|
"id": "custom.cellOptions",
|
|
"value": {
|
|
"mode": "gradient",
|
|
"type": "gauge"
|
|
}
|
|
},
|
|
{
|
|
"id": "color",
|
|
"value": {
|
|
"mode": "continuous-BlPu"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"gridPos": {
|
|
"h": 6,
|
|
"w": 9,
|
|
"x": 0,
|
|
"y": 30
|
|
},
|
|
"id": 7,
|
|
"interval": "1h",
|
|
"options": {
|
|
"cellHeight": "sm",
|
|
"footer": {
|
|
"countRows": false,
|
|
"fields": "",
|
|
"reducer": [
|
|
"sum"
|
|
],
|
|
"show": false
|
|
},
|
|
"showHeader": true,
|
|
"sortBy": [
|
|
{
|
|
"desc": true,
|
|
"displayName": "Requests"
|
|
}
|
|
]
|
|
},
|
|
"pluginVersion": "10.1.5",
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "c0696081-8d61-4fbd-bde3-6510cbc6b07f"
|
|
},
|
|
"editorMode": "code",
|
|
"expr": "topk(10, sum by (http_user_agent) (count_over_time({filename=\"/var/log/nginx/json_access.log\", host=\"$host\"} !~ `10.10.*.*` | json | __error__=\"\" [$__interval])))",
|
|
"legendFormat": "{{http_user_agent}}",
|
|
"queryType": "range",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "Top User Agents",
|
|
"transformations": [
|
|
{
|
|
"id": "reduce",
|
|
"options": {
|
|
"reducers": [
|
|
"sum"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"id": "organize",
|
|
"options": {
|
|
"excludeByName": {
|
|
"Field": false
|
|
},
|
|
"indexByName": {},
|
|
"renameByName": {
|
|
"Field": "Agent",
|
|
"Total": "Requests"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"type": "table"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "c0696081-8d61-4fbd-bde3-6510cbc6b07f"
|
|
},
|
|
"description": "",
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"custom": {
|
|
"align": "auto",
|
|
"cellOptions": {
|
|
"type": "auto"
|
|
},
|
|
"filterable": false,
|
|
"inspect": false
|
|
},
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green"
|
|
},
|
|
{
|
|
"color": "red",
|
|
"value": 80
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"overrides": [
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Total"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "custom.width",
|
|
"value": 300
|
|
},
|
|
{
|
|
"id": "custom.cellOptions",
|
|
"value": {
|
|
"mode": "gradient",
|
|
"type": "gauge"
|
|
}
|
|
},
|
|
{
|
|
"id": "color",
|
|
"value": {
|
|
"mode": "continuous-BlPu"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"gridPos": {
|
|
"h": 8,
|
|
"w": 15,
|
|
"x": 9,
|
|
"y": 30
|
|
},
|
|
"id": 12,
|
|
"interval": "5m",
|
|
"options": {
|
|
"cellHeight": "sm",
|
|
"footer": {
|
|
"countRows": false,
|
|
"fields": "",
|
|
"reducer": [
|
|
"sum"
|
|
],
|
|
"show": false
|
|
},
|
|
"showHeader": true,
|
|
"sortBy": [
|
|
{
|
|
"desc": true,
|
|
"displayName": "Total"
|
|
}
|
|
]
|
|
},
|
|
"pluginVersion": "10.1.5",
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "c0696081-8d61-4fbd-bde3-6510cbc6b07f"
|
|
},
|
|
"editorMode": "code",
|
|
"expr": "topk(5,sum by (request_uri) (count_over_time({filename=\"/var/log/nginx/json_access.log\", host=\"$host\"} !~ `10.10.*.*` | json | request_uri != \"/\" | __error__=\"\" [$__interval])))",
|
|
"legendFormat": "{{request_uri}}",
|
|
"queryType": "range",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "Top Requested Pages",
|
|
"transformations": [
|
|
{
|
|
"id": "reduce",
|
|
"options": {
|
|
"reducers": [
|
|
"sum"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"id": "organize",
|
|
"options": {
|
|
"excludeByName": {},
|
|
"indexByName": {},
|
|
"renameByName": {
|
|
"Field": "Page",
|
|
"Total": ""
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"type": "table"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "c0696081-8d61-4fbd-bde3-6510cbc6b07f"
|
|
},
|
|
"description": "",
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"custom": {
|
|
"align": "auto",
|
|
"cellOptions": {
|
|
"type": "auto"
|
|
},
|
|
"filterable": false,
|
|
"inspect": false
|
|
},
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green"
|
|
},
|
|
{
|
|
"color": "red",
|
|
"value": 80
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"overrides": [
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Total"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "custom.width",
|
|
"value": 300
|
|
},
|
|
{
|
|
"id": "custom.cellOptions",
|
|
"value": {
|
|
"mode": "gradient",
|
|
"type": "gauge"
|
|
}
|
|
},
|
|
{
|
|
"id": "color",
|
|
"value": {
|
|
"mode": "continuous-BlPu"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"gridPos": {
|
|
"h": 8,
|
|
"w": 9,
|
|
"x": 0,
|
|
"y": 36
|
|
},
|
|
"id": 29,
|
|
"interval": "5m",
|
|
"options": {
|
|
"cellHeight": "sm",
|
|
"footer": {
|
|
"countRows": false,
|
|
"fields": "",
|
|
"reducer": [
|
|
"sum"
|
|
],
|
|
"show": false
|
|
},
|
|
"showHeader": true,
|
|
"sortBy": [
|
|
{
|
|
"desc": true,
|
|
"displayName": "Total"
|
|
}
|
|
]
|
|
},
|
|
"pluginVersion": "10.1.5",
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "c0696081-8d61-4fbd-bde3-6510cbc6b07f"
|
|
},
|
|
"editorMode": "code",
|
|
"expr": "topk(5, sum by(server_name) (count_over_time({filename=\"/var/log/nginx/json_access.log\", host=\"$host\"} !~ `10.10.*.*` | json | server_name != ` ` | __error__=`` [$__interval])))",
|
|
"legendFormat": "{{request_uri}}",
|
|
"queryType": "range",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "Top Requested Domains",
|
|
"transformations": [
|
|
{
|
|
"id": "reduce",
|
|
"options": {
|
|
"reducers": [
|
|
"sum"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"id": "organize",
|
|
"options": {
|
|
"excludeByName": {},
|
|
"indexByName": {},
|
|
"renameByName": {
|
|
"Field": "Page",
|
|
"Total": ""
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"type": "table"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "c0696081-8d61-4fbd-bde3-6510cbc6b07f"
|
|
},
|
|
"description": "",
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"custom": {
|
|
"align": "auto",
|
|
"cellOptions": {
|
|
"type": "auto"
|
|
},
|
|
"filterable": false,
|
|
"inspect": false
|
|
},
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green"
|
|
},
|
|
{
|
|
"color": "red",
|
|
"value": 80
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"overrides": [
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Requests"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "custom.width",
|
|
"value": 300
|
|
},
|
|
{
|
|
"id": "custom.cellOptions",
|
|
"value": {
|
|
"mode": "gradient",
|
|
"type": "gauge"
|
|
}
|
|
},
|
|
{
|
|
"id": "color",
|
|
"value": {
|
|
"mode": "continuous-BlPu"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"gridPos": {
|
|
"h": 6,
|
|
"w": 15,
|
|
"x": 9,
|
|
"y": 38
|
|
},
|
|
"id": 6,
|
|
"interval": "1h",
|
|
"options": {
|
|
"cellHeight": "sm",
|
|
"footer": {
|
|
"countRows": false,
|
|
"fields": "",
|
|
"reducer": [
|
|
"sum"
|
|
],
|
|
"show": false
|
|
},
|
|
"showHeader": true,
|
|
"sortBy": [
|
|
{
|
|
"desc": true,
|
|
"displayName": "Requests"
|
|
}
|
|
]
|
|
},
|
|
"pluginVersion": "10.1.5",
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "c0696081-8d61-4fbd-bde3-6510cbc6b07f"
|
|
},
|
|
"editorMode": "code",
|
|
"expr": "topk(20, sum by (http_referer) (count_over_time({filename=\"/var/log/nginx/json_access.log\", host=\"$host\"} !~ `10.10.*.*` | json | http_referer != \"\" and http_referer !~ \".*?$host.*?\" | __error__=\"\" [$__interval])))",
|
|
"legendFormat": "{{http_referer}}",
|
|
"queryType": "range",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "Top HTTP Referers",
|
|
"transformations": [
|
|
{
|
|
"id": "reduce",
|
|
"options": {
|
|
"reducers": [
|
|
"sum"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"id": "organize",
|
|
"options": {
|
|
"excludeByName": {},
|
|
"indexByName": {},
|
|
"renameByName": {
|
|
"Field": "Referer",
|
|
"Total": "Requests"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"type": "table"
|
|
},
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "c0696081-8d61-4fbd-bde3-6510cbc6b07f"
|
|
},
|
|
"description": "",
|
|
"fieldConfig": {
|
|
"defaults": {
|
|
"custom": {
|
|
"align": "auto",
|
|
"cellOptions": {
|
|
"type": "auto"
|
|
},
|
|
"filterable": false,
|
|
"inspect": false
|
|
},
|
|
"mappings": [],
|
|
"thresholds": {
|
|
"mode": "absolute",
|
|
"steps": [
|
|
{
|
|
"color": "green"
|
|
},
|
|
{
|
|
"color": "red",
|
|
"value": 80
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"overrides": [
|
|
{
|
|
"matcher": {
|
|
"id": "byName",
|
|
"options": "Requests"
|
|
},
|
|
"properties": [
|
|
{
|
|
"id": "custom.width",
|
|
"value": 300
|
|
},
|
|
{
|
|
"id": "custom.cellOptions",
|
|
"value": {
|
|
"mode": "gradient",
|
|
"type": "gauge"
|
|
}
|
|
},
|
|
{
|
|
"id": "color",
|
|
"value": {
|
|
"mode": "continuous-BlPu"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"gridPos": {
|
|
"h": 8,
|
|
"w": 9,
|
|
"x": 0,
|
|
"y": 44
|
|
},
|
|
"id": 3,
|
|
"interval": "30m",
|
|
"options": {
|
|
"cellHeight": "sm",
|
|
"footer": {
|
|
"countRows": false,
|
|
"fields": "",
|
|
"reducer": [
|
|
"sum"
|
|
],
|
|
"show": false
|
|
},
|
|
"showHeader": true,
|
|
"sortBy": [
|
|
{
|
|
"desc": true,
|
|
"displayName": "Requests"
|
|
}
|
|
]
|
|
},
|
|
"pluginVersion": "10.1.5",
|
|
"targets": [
|
|
{
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "c0696081-8d61-4fbd-bde3-6510cbc6b07f"
|
|
},
|
|
"editorMode": "builder",
|
|
"expr": "topk(10, sum by(remote_addr) (count_over_time({filename=\"/var/log/nginx/json_access.log\", host=\"$host\"} !~ `10.10.*.*` | json | __error__=`` [$__interval])))",
|
|
"legendFormat": "{{remote_addr}}",
|
|
"queryType": "range",
|
|
"refId": "A"
|
|
}
|
|
],
|
|
"title": "Top IPs",
|
|
"transformations": [
|
|
{
|
|
"id": "reduce",
|
|
"options": {
|
|
"reducers": [
|
|
"sum"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"id": "organize",
|
|
"options": {
|
|
"excludeByName": {
|
|
"Field": false
|
|
},
|
|
"indexByName": {},
|
|
"renameByName": {
|
|
"Field": "IP Address",
|
|
"Total": "Requests"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"type": "table"
|
|
}
|
|
],
|
|
"refresh": "",
|
|
"schemaVersion": 38,
|
|
"tags": [],
|
|
"templating": {
|
|
"list": [
|
|
{
|
|
"current": {
|
|
"selected": false,
|
|
"text": "locker98",
|
|
"value": "locker98"
|
|
},
|
|
"datasource": {
|
|
"type": "loki",
|
|
"uid": "c0696081-8d61-4fbd-bde3-6510cbc6b07f"
|
|
},
|
|
"definition": "label_values({filename=\"/var/log/nginx/json_access.log\"}, host)",
|
|
"hide": 0,
|
|
"includeAll": false,
|
|
"label": "host",
|
|
"multi": false,
|
|
"name": "host",
|
|
"options": [],
|
|
"query": "label_values({filename=\"/var/log/nginx/json_access.log\"}, host)",
|
|
"refresh": 1,
|
|
"regex": "",
|
|
"skipUrlSync": false,
|
|
"sort": 0,
|
|
"tagValuesQuery": "",
|
|
"tagsQuery": "",
|
|
"type": "query",
|
|
"useTags": false
|
|
}
|
|
]
|
|
},
|
|
"time": {
|
|
"from": "now-24h",
|
|
"to": "now"
|
|
},
|
|
"timepicker": {
|
|
"refresh_intervals": [
|
|
"10s",
|
|
"30s",
|
|
"1m",
|
|
"5m",
|
|
"15m",
|
|
"30m",
|
|
"1h",
|
|
"2h",
|
|
"1d"
|
|
]
|
|
},
|
|
"timezone": "",
|
|
"title": "Loki v2 Web Analytics Dashboard for NGINX new",
|
|
"uid": "bd9101f8-04ab-4ee8-9e7c-85bdcb94c7d6",
|
|
"version": 2,
|
|
"weekStart": ""
|
|
} |