Verified Commit ec85864d authored by Evangelos Foutras's avatar Evangelos Foutras 🐱
Browse files

Fix host variable selector in nginx dashboard

parent b98bd572
Pipeline #11010 passed with stage
in 36 seconds
...@@ -8,6 +8,12 @@ ...@@ -8,6 +8,12 @@
"hide": true, "hide": true,
"iconColor": "rgba(0, 211, 255, 1)", "iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts", "name": "Annotations & Alerts",
"target": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dashboard"
},
"type": "dashboard" "type": "dashboard"
} }
] ]
...@@ -16,8 +22,7 @@ ...@@ -16,8 +22,7 @@
"editable": true, "editable": true,
"gnetId": 12559, "gnetId": 12559,
"graphTooltip": 0, "graphTooltip": 0,
"id": 35, "iteration": 1630912444243,
"iteration": 1617910462309,
"links": [], "links": [],
"panels": [ "panels": [
{ {
...@@ -67,7 +72,7 @@ ...@@ -67,7 +72,7 @@
"text": {}, "text": {},
"textMode": "value" "textMode": "value"
}, },
"pluginVersion": "7.5.3", "pluginVersion": "8.1.2",
"targets": [ "targets": [
{ {
"expr": "sum by(host) (count_over_time({job=\"nginx\", instance=\"$host\"}[$__interval])) ", "expr": "sum by(host) (count_over_time({job=\"nginx\", instance=\"$host\"}[$__interval])) ",
...@@ -127,7 +132,7 @@ ...@@ -127,7 +132,7 @@
"text": {}, "text": {},
"textMode": "auto" "textMode": "auto"
}, },
"pluginVersion": "7.5.3", "pluginVersion": "8.1.2",
"targets": [ "targets": [
{ {
"expr": "sum by (status) (count_over_time({job=\"nginx\", instance=\"$host\"} | json | __error__=\"\" [$__interval]))", "expr": "sum by (status) (count_over_time({job=\"nginx\", instance=\"$host\"} | json | __error__=\"\" [$__interval]))",
...@@ -154,6 +159,8 @@ ...@@ -154,6 +159,8 @@
}, },
"decimals": 1, "decimals": 1,
"mappings": [], "mappings": [],
"max": 100,
"min": 0,
"thresholds": { "thresholds": {
"mode": "absolute", "mode": "absolute",
"steps": [ "steps": [
...@@ -197,7 +204,7 @@ ...@@ -197,7 +204,7 @@
"text": {}, "text": {},
"textMode": "value" "textMode": "value"
}, },
"pluginVersion": "7.5.3", "pluginVersion": "8.1.2",
"targets": [ "targets": [
{ {
"expr": "sum(count_over_time({job=\"nginx\", instance=\"$host\"} | json | status >= 500 |__error__=\"\"[$__interval])) / (sum(count_over_time({job=\"nginx\", instance=\"$host\"} | json | __error__=\"\"[$__interval]))/ 100)", "expr": "sum(count_over_time({job=\"nginx\", instance=\"$host\"} | json | status >= 500 |__error__=\"\"[$__interval])) / (sum(count_over_time({job=\"nginx\", instance=\"$host\"} | json | __error__=\"\"[$__interval]))/ 100)",
...@@ -259,7 +266,7 @@ ...@@ -259,7 +266,7 @@
"text": {}, "text": {},
"textMode": "auto" "textMode": "auto"
}, },
"pluginVersion": "7.5.3", "pluginVersion": "8.1.2",
"targets": [ "targets": [
{ {
"expr": "bytes_over_time({job=\"nginx\", instance=\"$host\"}[$__interval])", "expr": "bytes_over_time({job=\"nginx\", instance=\"$host\"}[$__interval])",
...@@ -317,7 +324,7 @@ ...@@ -317,7 +324,7 @@
"text": {}, "text": {},
"textMode": "value" "textMode": "value"
}, },
"pluginVersion": "7.5.3", "pluginVersion": "8.1.2",
"targets": [ "targets": [
{ {
"expr": "count(sum by (remote_addr) (count_over_time({job=\"nginx\", instance=\"$host\"} | json | __error__=\"\" [$__interval])))", "expr": "count(sum by (remote_addr) (count_over_time({job=\"nginx\", instance=\"$host\"} | json | __error__=\"\" [$__interval])))",
...@@ -379,7 +386,7 @@ ...@@ -379,7 +386,7 @@
"text": {}, "text": {},
"textMode": "value" "textMode": "value"
}, },
"pluginVersion": "7.5.3", "pluginVersion": "8.1.2",
"targets": [ "targets": [
{ {
"expr": "sum by (host) (sum_over_time({job=\"nginx\", instance=\"$host\"} | json | unwrap body_bytes_sent | __error__=\"\" [$__interval]))", "expr": "sum by (host) (sum_over_time({job=\"nginx\", instance=\"$host\"} | json | unwrap body_bytes_sent | __error__=\"\" [$__interval]))",
...@@ -442,7 +449,7 @@ ...@@ -442,7 +449,7 @@
"text": {}, "text": {},
"textMode": "auto" "textMode": "auto"
}, },
"pluginVersion": "7.5.3", "pluginVersion": "8.1.2",
"targets": [ "targets": [
{ {
"expr": "count_over_time({job=\"nginx\", instance=\"$host\"}[$__interval])", "expr": "count_over_time({job=\"nginx\", instance=\"$host\"}[$__interval])",
...@@ -468,10 +475,6 @@ ...@@ -468,10 +475,6 @@
"dashes": false, "dashes": false,
"datasource": "Loki", "datasource": "Loki",
"description": "", "description": "",
"fieldConfig": {
"defaults": {},
"overrides": []
},
"fill": 1, "fill": 1,
"fillGradient": 10, "fillGradient": 10,
"gridPos": { "gridPos": {
...@@ -500,7 +503,7 @@ ...@@ -500,7 +503,7 @@
"alertThreshold": false "alertThreshold": false
}, },
"percentage": false, "percentage": false,
"pluginVersion": "7.5.3", "pluginVersion": "8.1.2",
"pointradius": 2, "pointradius": 2,
"points": false, "points": false,
"renderer": "flot", "renderer": "flot",
...@@ -588,10 +591,6 @@ ...@@ -588,10 +591,6 @@
"dashes": false, "dashes": false,
"datasource": "Loki", "datasource": "Loki",
"description": "", "description": "",
"fieldConfig": {
"defaults": {},
"overrides": []
},
"fill": 8, "fill": 8,
"fillGradient": 10, "fillGradient": 10,
"gridPos": { "gridPos": {
...@@ -619,7 +618,7 @@ ...@@ -619,7 +618,7 @@
"alertThreshold": false "alertThreshold": false
}, },
"percentage": false, "percentage": false,
"pluginVersion": "7.5.3", "pluginVersion": "8.1.2",
"pointradius": 2, "pointradius": 2,
"points": false, "points": false,
"renderer": "flot", "renderer": "flot",
...@@ -718,7 +717,7 @@ ...@@ -718,7 +717,7 @@
"alertThreshold": true "alertThreshold": true
}, },
"percentage": false, "percentage": false,
"pluginVersion": "7.5.3", "pluginVersion": "8.1.2",
"pointradius": 2, "pointradius": 2,
"points": false, "points": false,
"renderer": "flot", "renderer": "flot",
...@@ -820,7 +819,7 @@ ...@@ -820,7 +819,7 @@
"alertThreshold": true "alertThreshold": true
}, },
"percentage": false, "percentage": false,
"pluginVersion": "7.5.3", "pluginVersion": "8.1.2",
"pointradius": 2, "pointradius": 2,
"points": false, "points": false,
"renderer": "flot", "renderer": "flot",
...@@ -907,10 +906,6 @@ ...@@ -907,10 +906,6 @@
"dashes": false, "dashes": false,
"datasource": "Loki", "datasource": "Loki",
"description": "The total amount of requests per second", "description": "The total amount of requests per second",
"fieldConfig": {
"defaults": {},
"overrides": []
},
"fill": 1, "fill": 1,
"fillGradient": 0, "fillGradient": 0,
"gridPos": { "gridPos": {
...@@ -937,7 +932,7 @@ ...@@ -937,7 +932,7 @@
"alertThreshold": true "alertThreshold": true
}, },
"percentage": false, "percentage": false,
"pluginVersion": "7.5.3", "pluginVersion": "8.1.2",
"pointradius": 2, "pointradius": 2,
"points": false, "points": false,
"renderer": "flot", "renderer": "flot",
...@@ -953,7 +948,9 @@ ...@@ -953,7 +948,9 @@
} }
], ],
"thresholds": [], "thresholds": [],
"timeFrom": null,
"timeRegions": [], "timeRegions": [],
"timeShift": null,
"title": "Requests per second", "title": "Requests per second",
"tooltip": { "tooltip": {
"shared": true, "shared": true,
...@@ -1003,6 +1000,7 @@ ...@@ -1003,6 +1000,7 @@
}, },
"custom": { "custom": {
"align": null, "align": null,
"displayMode": "auto",
"filterable": false "filterable": false
}, },
"mappings": [], "mappings": [],
...@@ -1063,7 +1061,7 @@ ...@@ -1063,7 +1061,7 @@
} }
] ]
}, },
"pluginVersion": "7.5.3", "pluginVersion": "8.1.2",
"targets": [ "targets": [
{ {
"expr": "topk(100, sum by (http_user_agent) (count_over_time({job=\"nginx\", instance=\"$host\"} | json | __error__=\"\" [$__interval])))", "expr": "topk(100, sum by (http_user_agent) (count_over_time({job=\"nginx\", instance=\"$host\"} | json | __error__=\"\" [$__interval])))",
...@@ -1106,6 +1104,7 @@ ...@@ -1106,6 +1104,7 @@
}, },
"custom": { "custom": {
"align": null, "align": null,
"displayMode": "auto",
"filterable": false "filterable": false
}, },
"mappings": [], "mappings": [],
...@@ -1166,7 +1165,7 @@ ...@@ -1166,7 +1165,7 @@
} }
] ]
}, },
"pluginVersion": "7.5.3", "pluginVersion": "8.1.2",
"targets": [ "targets": [
{ {
"expr": "topk(300, sum by (request_uri) (count_over_time({job=\"nginx\", instance=\"$host\"} !~ `\\.ico|\\.svg|\\.css|\\.png|\\.txt|\\.js|\\.xml` | json | status = 200 and request_uri != \"/\" | __error__=\"\" [$__interval])))", "expr": "topk(300, sum by (request_uri) (count_over_time({job=\"nginx\", instance=\"$host\"} !~ `\\.ico|\\.svg|\\.css|\\.png|\\.txt|\\.js|\\.xml` | json | status = 200 and request_uri != \"/\" | __error__=\"\" [$__interval])))",
...@@ -1209,6 +1208,7 @@ ...@@ -1209,6 +1208,7 @@
}, },
"custom": { "custom": {
"align": null, "align": null,
"displayMode": "auto",
"filterable": false "filterable": false
}, },
"mappings": [], "mappings": [],
...@@ -1269,7 +1269,7 @@ ...@@ -1269,7 +1269,7 @@
} }
] ]
}, },
"pluginVersion": "7.5.3", "pluginVersion": "8.1.2",
"targets": [ "targets": [
{ {
"expr": "topk(100, sum by (remote_addr) (count_over_time({job=\"nginx\", instance=\"$host\"} | json | __error__=\"\" [$__interval])))", "expr": "topk(100, sum by (remote_addr) (count_over_time({job=\"nginx\", instance=\"$host\"} | json | __error__=\"\" [$__interval])))",
...@@ -1310,7 +1310,7 @@ ...@@ -1310,7 +1310,7 @@
} }
], ],
"refresh": false, "refresh": false,
"schemaVersion": 27, "schemaVersion": 30,
"style": "dark", "style": "dark",
"tags": [], "tags": [],
"templating": { "templating": {
...@@ -1323,22 +1323,21 @@ ...@@ -1323,22 +1323,21 @@
"value": "archlinux.org" "value": "archlinux.org"
}, },
"datasource": "Loki", "datasource": "Loki",
"definition": "label_values({filename=~`.*json_access.log.*`}, instance)", "definition": "label_values({job=\"nginx\"}, instance)",
"description": null, "description": null,
"error": null, "error": null,
"hide": 0, "hide": 0,
"includeAll": false, "includeAll": false,
"label": "host", "label": "Host",
"multi": false, "multi": false,
"name": "host", "name": "host",
"options": [], "options": [],
"query": "label_values({filename=~`.*json_access.log.*`}, instance)", "query": "label_values({job=\"nginx\"}, instance)",
"refresh": 1, "refresh": 1,
"regex": "", "regex": "",
"skipUrlSync": false, "skipUrlSync": false,
"sort": 0, "sort": 1,
"tagValuesQuery": "", "tagValuesQuery": "",
"tags": [],
"tagsQuery": "", "tagsQuery": "",
"type": "query", "type": "query",
"useTags": false "useTags": false
...@@ -1365,5 +1364,5 @@ ...@@ -1365,5 +1364,5 @@
"timezone": "", "timezone": "",
"title": "NGINX Web Analytics", "title": "NGINX Web Analytics",
"uid": "Nz6kKgtGj", "uid": "Nz6kKgtGj",
"version": 6 "version": 7
} }
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment