From 5a22f49287c8085a4ce3417bdc424100aaec65ca Mon Sep 17 00:00:00 2001 From: Robert Steiner Date: Fri, 20 Sep 2024 10:45:53 +0200 Subject: [PATCH] fix(framework:skip) Fix Docker Compose example Signed-off-by: Robert Steiner --- examples/flower-via-docker-compose/Dockerfile | 11 +- .../config/grafana.ini | 5 - .../dashboards/dashboard_index.json | 993 +++++++++++------- .../datasources/prometheus-datasource.yml | 12 +- .../helpers/generate_docker_compose.py | 8 +- 5 files changed, 624 insertions(+), 405 deletions(-) diff --git a/examples/flower-via-docker-compose/Dockerfile b/examples/flower-via-docker-compose/Dockerfile index ee6fee3103a..9e7d4ff7aba 100644 --- a/examples/flower-via-docker-compose/Dockerfile +++ b/examples/flower-via-docker-compose/Dockerfile @@ -1,5 +1,5 @@ # Use an official Python runtime as a parent image -FROM python:3.10-slim-buster +FROM python:3.11-slim-buster # Set the working directory in the container to /app WORKDIR /app @@ -10,10 +10,9 @@ COPY ./requirements.txt /app/requirements.txt # Install gcc and other dependencies RUN apt-get update && apt-get install -y \ gcc \ - python3-dev && \ - rm -rf /var/lib/apt/lists/* + pkg-config \ + libhdf5-dev \ + && rm -rf /var/lib/apt/lists/* # Install any needed packages specified in requirements.txt -RUN pip install -r requirements.txt - - +RUN pip install --no-cache-dir -r requirements.txt diff --git a/examples/flower-via-docker-compose/config/grafana.ini b/examples/flower-via-docker-compose/config/grafana.ini index 775f39d7ec2..208eb6e427b 100644 --- a/examples/flower-via-docker-compose/config/grafana.ini +++ b/examples/flower-via-docker-compose/config/grafana.ini @@ -1,8 +1,3 @@ -[security] -allow_embedding = true -admin_user = admin -admin_password = admin - [dashboards] default_home_dashboard_path = /etc/grafana/provisioning/dashboards/dashboard_index.json diff --git a/examples/flower-via-docker-compose/config/provisioning/dashboards/dashboard_index.json b/examples/flower-via-docker-compose/config/provisioning/dashboards/dashboard_index.json index b52f19c5750..75ee224b000 100644 --- a/examples/flower-via-docker-compose/config/provisioning/dashboards/dashboard_index.json +++ b/examples/flower-via-docker-compose/config/provisioning/dashboards/dashboard_index.json @@ -15,12 +15,12 @@ } ] }, - "description": "Simple exporter for cadvisor only", + "description": "Simple exporter for cadvisor and application metrics", "editable": true, "fiscalYearStartMonth": 0, "gnetId": 14282, "graphTooltip": 0, - "id": 12, + "id": 1, "links": [], "liveNow": false, "panels": [ @@ -36,10 +36,7 @@ "type": "row" }, { - "datasource": { - "type": "prometheus", - "uid": "db69454e-e558-479e-b4fc-80db52bf91da" - }, + "datasource": {}, "description": "Averaged federated accuracy across clients", "fieldConfig": { "defaults": { @@ -113,6 +110,7 @@ "showLegend": false }, "tooltip": { + "maxHeight": 600, "mode": "single", "sort": "none" } @@ -124,7 +122,7 @@ "uid": "db69454e-e558-479e-b4fc-80db52bf91da" }, "disableTextWrap": false, - "editorMode": "builder", + "editorMode": "code", "expr": "model_accuracy", "fullMetaSearch": false, "includeNullMetadata": true, @@ -139,10 +137,7 @@ "type": "timeseries" }, { - "datasource": { - "type": "prometheus", - "uid": "db69454e-e558-479e-b4fc-80db52bf91da" - }, + "datasource": {}, "description": "Averaged Federated Loss across clients", "fieldConfig": { "defaults": { @@ -213,6 +208,7 @@ "showLegend": false }, "tooltip": { + "maxHeight": 600, "mode": "single", "sort": "none" } @@ -224,7 +220,7 @@ "uid": "db69454e-e558-479e-b4fc-80db52bf91da" }, "disableTextWrap": false, - "editorMode": "builder", + "editorMode": "code", "expr": "model_loss", "fullMetaSearch": false, "includeNullMetadata": true, @@ -240,10 +236,7 @@ }, { "collapsed": false, - "datasource": { - "type": "prometheus", - "uid": "db69454e-e558-479e-b4fc-80db52bf91da" - }, + "datasource": {}, "gridPos": { "h": 1, "w": 24, @@ -265,54 +258,132 @@ "type": "row" }, { - "aliasColors": { - "client1": "red", - "client2": "blue", - "server": "yellow" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "db69454e-e558-479e-b4fc-80db52bf91da" + "datasource": {}, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "client1" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "client2" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "server" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "yellow", + "mode": "fixed" + } + } + ] + } + ] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 7, "w": 24, "x": 0, "y": 10 }, - "hiddenSeries": false, "id": 15, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null as zero", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "none" + } }, - "percentage": false, "pluginVersion": "10.2.2", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { "datasource": { @@ -328,44 +399,12 @@ "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "CPU Usage", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:606", - "format": "percent", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:607", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { "collapsed": false, - "datasource": { - "type": "prometheus", - "uid": "db69454e-e558-479e-b4fc-80db52bf91da" - }, + "datasource": {}, "gridPos": { "h": 1, "w": 24, @@ -387,61 +426,138 @@ "type": "row" }, { - "aliasColors": { - "client1": "red", - "client2": "blue", - "server": "yellow" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "db69454e-e558-479e-b4fc-80db52bf91da" + "datasource": {}, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "client1" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "client2" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "server" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "yellow", + "mode": "fixed" + } + } + ] + } + ] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 18 }, - "hiddenSeries": false, "id": 9, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null as zero", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "none" + } }, - "percentage": false, "pluginVersion": "10.2.2", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "db69454e-e558-479e-b4fc-80db52bf91da" }, - "editorMode": "code", + "editorMode": "builder", "expr": "sum(container_memory_rss{instance=~\"$host\",name=~\"$container\",name=~\".+\", name !~ \"(prometheus|cadvisor|grafana)\"}) by (name)", "hide": false, "interval": "", @@ -450,94 +566,142 @@ "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "Memory Usage", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:606", - "format": "bytes", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:607", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": { - "client1": "red", - "client2": "blue", - "server": "yellow" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "db69454e-e558-479e-b4fc-80db52bf91da" - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 18 - }, - "hiddenSeries": false, - "id": 14, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null as zero", + "datasource": {}, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "client1" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "client2" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "server" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "yellow", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 18 + }, + "id": 14, "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "none" + } }, - "percentage": false, "pluginVersion": "10.2.2", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "db69454e-e558-479e-b4fc-80db52bf91da" }, - "editorMode": "code", + "editorMode": "builder", "expr": "sum(container_memory_cache{instance=~\"$host\",name=~\"$container\",name=~\".+\", name !~ \"(prometheus|cadvisor|grafana)\"}) by (name)", "hide": false, "interval": "", @@ -546,44 +710,12 @@ "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "Memory Cached", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:606", - "format": "bytes", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:607", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { "collapsed": false, - "datasource": { - "type": "prometheus", - "uid": "db69454e-e558-479e-b4fc-80db52bf91da" - }, + "datasource": {}, "gridPos": { "h": 1, "w": 24, @@ -605,63 +737,138 @@ "type": "row" }, { - "aliasColors": { - "client1": "red", - "client2": "blue", - "server": "yellow" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "db69454e-e558-479e-b4fc-80db52bf91da" + "datasource": {}, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "Bps" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "client1" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "client2" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "server" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "yellow", + "mode": "fixed" + } + } + ] + } + ] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 27 }, - "hiddenSeries": false, "id": 4, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "hideEmpty": false, - "hideZero": false, - "max": true, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "none" + } }, - "percentage": false, "pluginVersion": "10.2.2", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "db69454e-e558-479e-b4fc-80db52bf91da" }, - "editorMode": "code", + "editorMode": "builder", "expr": "sum(rate(container_network_receive_bytes_total{instance=~\"$host\",name=~\"$container\",name=~\".+\", name !~ \"(prometheus|cadvisor|grafana)\"}[10s])) by (name)", "hide": false, "interval": "", @@ -670,94 +877,142 @@ "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "Received Network Traffic", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:674", - "format": "Bps", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:675", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { - "aliasColors": { - "client1": "red", - "client2": "blue", - "server": "yellow" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": { - "type": "prometheus", - "uid": "db69454e-e558-479e-b4fc-80db52bf91da" + "datasource": {}, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "Bps" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "client1" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "client2" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "server" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "yellow", + "mode": "fixed" + } + } + ] + } + ] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 27 }, - "hiddenSeries": false, "id": 6, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true + }, + "tooltip": { + "maxHeight": 600, + "mode": "multi", + "sort": "none" + } }, - "percentage": false, "pluginVersion": "10.2.2", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "db69454e-e558-479e-b4fc-80db52bf91da" }, - "editorMode": "code", + "editorMode": "builder", "expr": "sum(rate(container_network_transmit_bytes_total{instance=~\"$host\",name=~\"$container\",name=~\".+\", name !~ \"(prometheus|cadvisor|grafana)\"}[10s])) by (name)", "interval": "", "legendFormat": "{{name}}", @@ -765,37 +1020,8 @@ "refId": "A" } ], - "thresholds": [], - "timeRegions": [], "title": "Sent Network Traffic", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "mode": "time", - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:832", - "format": "Bps", - "logBase": 1, - "show": true - }, - { - "$$hashKey": "object:833", - "format": "short", - "logBase": 1, - "show": true - } - ], - "yaxis": { - "align": false - } + "type": "timeseries" }, { "collapsed": false, @@ -824,10 +1050,7 @@ "type": "row" }, { - "datasource": { - "type": "prometheus", - "uid": "db69454e-e558-479e-b4fc-80db52bf91da" - }, + "datasource": {}, "fieldConfig": { "defaults": { "custom": { @@ -916,18 +1139,19 @@ "showHeader": true, "sortBy": [] }, - "pluginVersion": "10.2.2", + "pluginVersion": "11.0.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "db69454e-e558-479e-b4fc-80db52bf91da" }, + "editorMode": "code", "expr": "(time() - container_start_time_seconds{instance=~\"$host\",name=~\"$container\",name=~\".+\"})/86400", "format": "table", "instant": true, "interval": "", - "legendFormat": "{{name}}", + "legendFormat": "__auto", "refId": "A" } ], @@ -969,8 +1193,8 @@ "type": "table" } ], - "refresh": "auto", - "schemaVersion": 38, + "refresh": "5s", + "schemaVersion": 39, "tags": [], "templating": { "list": [ @@ -1042,10 +1266,11 @@ "from": "now-15m", "to": "now" }, + "timeRangeUpdatedDuringEditOrView": false, "timepicker": {}, "timezone": "", - "title": "Cadvisor exporter Copy", + "title": "Flower Dashboard", "uid": "fcf2a8da-792c-4b9f-a22f-876820b53c2f", - "version": 2, + "version": 3, "weekStart": "" -} \ No newline at end of file +} diff --git a/examples/flower-via-docker-compose/config/provisioning/datasources/prometheus-datasource.yml b/examples/flower-via-docker-compose/config/provisioning/datasources/prometheus-datasource.yml index 7c8ce00fdcd..2ae3f9c7757 100644 --- a/examples/flower-via-docker-compose/config/provisioning/datasources/prometheus-datasource.yml +++ b/examples/flower-via-docker-compose/config/provisioning/datasources/prometheus-datasource.yml @@ -1,9 +1,9 @@ apiVersion: 1 datasources: -- name: Prometheus - type: prometheus - access: proxy - uid: db69454e-e558-479e-b4fc-80db52bf91da - url: http://host.docker.internal:9090 - isDefault: true + - name: Prometheus + type: prometheus + access: proxy + url: http://prometheus:9090 + isDefault: true + uid: db69454e-e558-479e-b4fc-80db52bf91da diff --git a/examples/flower-via-docker-compose/helpers/generate_docker_compose.py b/examples/flower-via-docker-compose/helpers/generate_docker_compose.py index 4067439a454..8aecc583ed9 100644 --- a/examples/flower-via-docker-compose/helpers/generate_docker_compose.py +++ b/examples/flower-via-docker-compose/helpers/generate_docker_compose.py @@ -31,7 +31,6 @@ def create_docker_compose(args): ] docker_compose_content = f""" -version: '3' services: prometheus: image: prom/prometheus:latest @@ -63,7 +62,7 @@ def create_docker_compose(args): - /sys:/sys:ro - /var/lib/docker/:/var/lib/docker:ro - /dev/disk/:/dev/disk:ro - - /var/run/docker.sock:/var/run/docker.sock + - /var/run/docker.sock:/var/run/docker.sock grafana: image: grafana/grafana:latest @@ -84,7 +83,6 @@ def create_docker_compose(args): command: - --config=/etc/grafana/grafana.ini - server: container_name: server build: @@ -96,11 +94,12 @@ def create_docker_compose(args): DOCKER_HOST_IP: host.docker.internal volumes: - .:/app - - /var/run/docker.sock:/var/run/docker.sock + - /var/run/docker.sock:/var/run/docker.sock ports: - "6000:6000" - "8265:8265" - "8000:8000" + stop_signal: SIGINT depends_on: - prometheus - grafana @@ -134,6 +133,7 @@ def create_docker_compose(args): FLASK_RUN_PORT: {6000 + i} container_name: client{i} DOCKER_HOST_IP: host.docker.internal + stop_signal: SIGINT """ docker_compose_content += "volumes:\n grafana-storage:\n"