diff --git a/salt/grafana/defaults.yaml b/salt/grafana/defaults.yaml index 6fcb7568a..f68f16ae0 100644 --- a/salt/grafana/defaults.yaml +++ b/salt/grafana/defaults.yaml @@ -318,131 +318,143 @@ grafana: y: 136 h: 8 w: 24 + uptime_docker_combined_current_graph: + gridPos: + x: 0 + y: 144 + h: 8 + w: 12 + uptime_docker_combined_trend_graph: + gridPos: + x: 12 + y: 144 + h: 8 + w: 12 row_logstash: gridPos: x: 0 - y: 144 + y: 152 h: 1 w: 24 logstash_estimated_eps_graph: gridPos: x: 0 - y: 145 + y: 153 h: 8 w: 24 row_elasticsearch: gridPos: x: 0 - y: 153 + y: 161 h: 1 w: 24 elasticsearch_document_count_graph: gridPos: x: 0 - y: 154 + y: 162 h: 8 w: 12 elasticsearch_thread_count_graph: gridPos: x: 12 - y: 154 + y: 162 h: 8 w: 12 elasticsearch_store_size_graph: gridPos: x: 0 - y: 162 + y: 170 h: 8 w: 12 elasticsearch_field_data_cache_size_graph: gridPos: x: 12 - y: 162 + y: 170 h: 8 w: 12 row_redis: gridPos: x: 0 - y: 170 + y: 178 h: 1 w: 24 redis_queue_graph: gridPos: x: 0 - y: 171 + y: 179 h: 8 w: 24 row_zeek: gridPos: x: 0 - y: 179 + y: 187 h: 1 w: 24 zeek_packet_loss_graph: gridPos: x: 0 - y: 180 + y: 188 h: 8 w: 10 zeek_capture_loss_graph: gridPos: x: 10 - y: 180 + y: 188 h: 8 w: 10 zeek_restarts_healthcheck_stat: gridPos: x: 20 - y: 180 + y: 188 h: 8 w: 4 row_suricata: gridPos: x: 0 - y: 188 + y: 196 h: 1 w: 24 suricata_packet_loss_graph: gridPos: x: 0 - y: 189 + y: 197 h: 8 w: 24 row_stenographer: gridPos: x: 0 - y: 197 + y: 205 h: 1 w: 24 stenographer_packet_loss_graph: gridPos: x: 0 - y: 198 + y: 206 h: 8 w: 16 stenographer_pcap_retention_graph: gridPos: x: 16 - y: 198 + y: 206 h: 8 w: 8 row_influxdb: gridPos: x: 0 - y: 206 + y: 214 h: 1 w: 24 influxdb_db_size_graph: gridPos: x: 0 - y: 207 + y: 214 h: 8 w: 24 @@ -740,87 +752,99 @@ grafana: y: 136 h: 8 w: 24 + uptime_docker_combined_current_graph: + gridPos: + x: 0 + y: 144 + h: 8 + w: 12 + uptime_docker_combined_trend_graph: + gridPos: + x: 12 + y: 144 + h: 8 + w: 12 row_logstash: gridPos: x: 0 - y: 144 + y: 152 h: 1 w: 24 logstash_estimated_eps_graph: gridPos: x: 0 - y: 145 + y: 153 h: 8 w: 24 row_redis: gridPos: x: 0 - y: 153 + y: 161 h: 1 w: 24 redis_queue_graph: gridPos: x: 0 - y: 154 + y: 162 h: 8 w: 24 row_zeek: gridPos: x: 0 - y: 162 + y: 170 h: 1 w: 24 zeek_packet_loss_graph: gridPos: x: 0 - y: 163 + y: 171 h: 8 w: 10 zeek_capture_loss_graph: gridPos: x: 10 - y: 163 + y: 171 h: 8 w: 10 zeek_restarts_healthcheck_stat: gridPos: x: 20 - y: 163 + y: 171 h: 8 w: 4 row_suricata: gridPos: x: 0 - y: 171 + y: 179 h: 1 w: 24 suricata_packet_loss_graph: gridPos: x: 0 - y: 172 + y: 180 h: 8 w: 24 row_stenographer: gridPos: x: 0 - y: 180 + y: 188 h: 1 w: 24 stenographer_packet_loss_graph: gridPos: x: 0 - y: 181 + y: 189 h: 8 w: 16 stenographer_pcap_retention_graph: gridPos: x: 16 - y: 181 + y: 189 h: 8 w: 8 diff --git a/salt/grafana/panels/uptime_docker_combined_current_graph.json.jinja b/salt/grafana/panels/uptime_docker_combined_current_graph.json.jinja new file mode 100644 index 000000000..509072c9b --- /dev/null +++ b/salt/grafana/panels/uptime_docker_combined_current_graph.json.jinja @@ -0,0 +1,161 @@ +{ + "type": "graph", + "title": "Container Uptime Current", + "gridPos": { + "x": {{ PANELS.uptime_docker_combined_current_graph.gridPos.x }}, + "y": {{ PANELS.uptime_docker_combined_current_graph.gridPos.y }}, + "w": {{ PANELS.uptime_docker_combined_current_graph.gridPos.w }}, + "h": {{ PANELS.uptime_docker_combined_current_graph.gridPos.h }} + }, + "id": 68896, + "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$/" + } + ], + "groupBy": [ + { + "type": "time", + "params": [ + "$__interval" + ] + }, + { + "type": "tag", + "params": [ + "container_name" + ] + }, + { + "type": "fill", + "params": [ + "null" + ] + } + ], + "select": [ + [ + { + "type": "field", + "params": [ + "uptime_ns" + ] + }, + { + "type": "last", + "params": [] + } + ] + ], + "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 + } + ], + "options": { + "alertThreshold": true + }, + "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 + } + ], + "xaxis": { + "show": true, + "mode": "time", + "name": null, + "values": [], + "buckets": null + }, + "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, + "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, + "percentage": false, + "steppedLine": false +} diff --git a/salt/grafana/panels/uptime_docker_combined_trend_graph.json.jinja b/salt/grafana/panels/uptime_docker_combined_trend_graph.json.jinja new file mode 100644 index 000000000..ab1df19fe --- /dev/null +++ b/salt/grafana/panels/uptime_docker_combined_trend_graph.json.jinja @@ -0,0 +1,159 @@ +{ + "type": "graph", + "title": "Container Uptime Trend", + "gridPos": { + "x": {{ PANELS.uptime_docker_combined_trend_graph.gridPos.x }}, + "y": {{ PANELS.uptime_docker_combined_trend_graph.gridPos.y }}, + "w": {{ PANELS.uptime_docker_combined_trend_graph.gridPos.w }}, + "h": {{ PANELS.uptime_docker_combined_trend_graph.gridPos.h }} + }, + "id": 68999, + "targets": [ + { + "refId": "A", + "queryType": "randomWalk", + "policy": "so_long_term", + "resultFormat": "time_series", + "orderByTime": "ASC", + "tags": [ + { + "key": "host", + "operator": "=~", + "value": "/^$servername$/" + }, + { + "condition": "AND", + "key": "container_name", + "operator": "=~", + "value": "/^$containers$/" + } + ], + "groupBy": [ + { + "type": "time", + "params": [ + "$__interval" + ] + }, + { + "type": "tag", + "params": [ + "container_name" + ] + }, + { + "type": "fill", + "params": [ + "null" + ] + } + ], + "select": [ + [ + { + "type": "field", + "params": [ + "mean_uptime_ns" + ] + }, + { + "type": "last", + "params": [] + } + ] + ], + "measurement": "docker_container_status", + "alias": "$tag_container_name" + } + ], + "options": { + "alertThreshold": true + }, + "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 + } + ], + "xaxis": { + "show": true, + "mode": "time", + "name": null, + "values": [], + "buckets": null + }, + "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, + "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, + "percentage": false, + "steppedLine": false +}