From 61312397e1bfad34455e54bf42b8f31858a9bc51 Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Fri, 23 Jul 2021 08:25:43 -0400 Subject: [PATCH] update container uptime panel --- ...e_docker_combined_current_graph.json.jinja | 229 +++++++++--------- 1 file changed, 120 insertions(+), 109 deletions(-) diff --git a/salt/grafana/panels/uptime_docker_combined_current_graph.json.jinja b/salt/grafana/panels/uptime_docker_combined_current_graph.json.jinja index 15a10fae6..2422cbbcc 100644 --- a/salt/grafana/panels/uptime_docker_combined_current_graph.json.jinja +++ b/salt/grafana/panels/uptime_docker_combined_current_graph.json.jinja @@ -1,6 +1,12 @@ { - "type": "graph", - "title": "Container Uptime Current", + "aliasColors": {}, + "dashLength": 10, + "datasource": "InfluxDB", + "decimals": 1, + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, "gridPos": { "x": {{ PANELS.uptime_docker_combined_current_graph.gridPos.x }}, "y": {{ PANELS.uptime_docker_combined_current_graph.gridPos.y }}, @@ -8,46 +14,73 @@ "h": {{ PANELS.uptime_docker_combined_current_graph.gridPos.h }} }, "id": 68896, + "legend": { + "alignAsTable": true, + "avg": false, + "current": true, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "sort": "current", + "sortDesc": false, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "connected", + "options": { + "alertThreshold": true + }, + "pluginVersion": "7.5.4", + "pointradius": 2, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, "targets": [ { - "refId": "A", - "queryType": "randomWalk", - "policy": "default", - "resultFormat": "time_series", - "orderByTime": "ASC", - "tags": [ - { - "key": "host", - "operator": "=~", - "value": "/^$servername$/" - }, - { - "condition": "AND", - "key": "container_name", - "operator": "=~", - "value": "/^$containers$/" - } - ], + "alias": "$tag_host $tag_role $tag_container_name", "groupBy": [ { - "type": "time", "params": [ "$__interval" + ], + "type": "time" + }, + { + "params": [ + "container_name" + ], + "type": "tag" + }, + { + "type": "tag", + "params": [ + "host" ] }, { "type": "tag", "params": [ - "container_name" + "role" ] }, { - "type": "fill", "params": [ "null" - ] + ], + "type": "fill" } ], + "measurement": "docker_container_status", + "orderByTime": "ASC", + "policy": "default", + "query": "SELECT last(\"uptime_ns\") FROM \"docker_container_status\" WHERE (\"host\" =~ /^$servername$/ AND \"container_name\" =~ /^$containers$/ AND \"role\" =~ /^$role$/) AND $timeFilter GROUP BY time($__interval), \"container_name\", \"host\", \"role\" fill(null)", + "queryType": "randomWalk", + "rawQuery": false, + "refId": "A", + "resultFormat": "time_series", "select": [ [ { @@ -62,102 +95,80 @@ } ] ], - "measurement": "docker_container_status", - "alias": "$tag_container_name", - "query": "SELECT last(\"health_status\") FROM \"docker_container_health\" WHERE (\"host\" =~ /^$servername$/ AND \"container_name\" =~ /^$containers$/) AND $timeFilter GROUP BY time($__interval), \"container_name\" fill(null)", - "rawQuery": false + "tags": [ + { + "key": "host", + "operator": "=~", + "value": "/^$servername$/" + }, + { + "condition": "AND", + "key": "container_name", + "operator": "=~", + "value": "/^$containers$/" + }, + { + "condition": "AND", + "key": "role", + "operator": "=~", + "value": "/^$role$/" + } + ], + "slimit": "", + "limit": "" } ], - "options": { - "alertThreshold": true + "thresholds": [], + "timeRegions": [], + "title": "Container Uptime Current", + "tooltip": { + "shared": true, + "sort": 1, + "value_type": "individual" }, - "datasource": "InfluxDB", - "fieldConfig": { - "defaults": {}, - "overrides": [] - }, - "pluginVersion": "7.5.4", - "renderer": "flot", - "yaxes": [ - { - "label": null, - "show": true, - "logBase": 1, - "min": null, - "max": null, - "format": "ns", - "$$hashKey": "object:192" - }, - { - "label": "", - "show": true, - "logBase": 1, - "min": "0", - "max": null, - "format": "short", - "$$hashKey": "object:193", - "decimals": 2 - } - ], + "type": "graph", "xaxis": { - "show": true, + "buckets": null, "mode": "time", "name": null, - "values": [], - "buckets": null + "show": true, + "values": [] }, + "yaxes": [ + { + "$$hashKey": "object:192", + "format": "ns", + "label": null, + "logBase": 1, + "max": "604800000000000", + "min": "0", + "show": true, + "decimals": 1 + }, + { + "$$hashKey": "object:193", + "decimals": 2, + "format": "short", + "label": "", + "logBase": 1, + "max": null, + "min": "0", + "show": false + } + ], "yaxis": { "align": false, "alignLevel": null }, - "lines": true, - "linewidth": 1, - "dashLength": 10, - "spaceLength": 10, - "pointradius": 2, - "legend": { - "show": true, - "values": true, - "min": false, - "max": false, - "current": true, - "sort": "current", - "sortDesc": false, - "total": false, - "avg": false, - "alignAsTable": true, - "rightSide": true - }, - "nullPointMode": "connected", - "tooltip": { - "value_type": "individual", - "shared": true, - "sort": 1 - }, - "aliasColors": {}, - "seriesOverrides": [], - "thresholds": [ - { - "value": 4500000000000, - "colorMode": "critical", - "op": "lt", - "fill": false, - "line": true, - "yaxis": "left", - "$$hashKey": "object:1299" - } - ], - "timeRegions": [], - "decimals": 2, - "fill": 0, - "timeFrom": null, - "timeShift": null, - "fillGradient": 0, - "dashes": false, - "hiddenSeries": false, - "points": false, "bars": false, - "stack": false, + "dashes": false, + "fill": 0, + "fillGradient": 0, + "hiddenSeries": false, "percentage": false, - "steppedLine": false + "points": false, + "stack": false, + "steppedLine": false, + "timeFrom": null, + "timeShift": null }