diff --git a/chart/Chart.yaml b/chart/Chart.yaml index c9fe3ed..d2fbdcd 100644 --- a/chart/Chart.yaml +++ b/chart/Chart.yaml @@ -3,7 +3,7 @@ annotations: catalog.cattle.io/display-name: CaaS Carbon Footprint name: caas-carbon-footprint description: A Helm chart for carbon footprint measurement -version: "0.0.11" +version: "0.0.12" appVersion: "0.0.10" keywords: - monitoring diff --git a/chart/files/caas-carbon-dashboard.json b/chart/files/caas-carbon-dashboard.json index 72104f6..61b26a3 100644 --- a/chart/files/caas-carbon-dashboard.json +++ b/chart/files/caas-carbon-dashboard.json @@ -1005,7 +1005,7 @@ { "datasource": "prometheus", "editorMode": "code", - "expr": "sum by (pod_name, container_namespace) (irate(kepler_container_package_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[1m]))", + "expr": "sum by (pod_name, container_namespace) (irate(kepler_container_package_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[5m]))", "hide": false, "interval": "", "legendFormat": "{{pod_name}} / {{container_namespace}} / PKG", @@ -1015,7 +1015,7 @@ { "datasource": "prometheus", "editorMode": "code", - "expr": "sum by (pod_name, container_namespace) (irate(kepler_container_dram_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[1m]))", + "expr": "sum by (pod_name, container_namespace) (irate(kepler_container_dram_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[5m]))", "hide": false, "interval": "", "legendFormat": "{{pod_name}} / {{container_namespace}} / DRAM", @@ -1028,7 +1028,7 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "sum by (pod_name, container_namespace) (irate(kepler_container_other_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[1m]))", + "expr": "sum by (pod_name, container_namespace) (irate(kepler_container_other_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[5m]))", "hide": false, "interval": "", "legendFormat": "{{pod_name}} / {{container_namespace}} / OTHER", @@ -1041,7 +1041,7 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "sum by (pod_name, container_namespace) (irate(kepler_container_gpu_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[1m]))", + "expr": "sum by (pod_name, container_namespace) (irate(kepler_container_gpu_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[5m]))", "hide": false, "legendFormat": "{{pod_name}} / {{container_namespace}} / GPU", "range": true, @@ -1198,7 +1198,7 @@ { "datasource": "prometheus", "editorMode": "code", - "expr": "sum by (pod_name, container_namespace) (irate(kepler_container_package_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[1m])*(entsoe_generation_co2*3600))", + "expr": "sum by (pod_name, container_namespace) (irate(kepler_container_package_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[5m])*(entsoe_generation_co2*3600))", "hide": false, "interval": "", "legendFormat": "{{pod_name}} / {{container_namespace}} / PKG", @@ -1208,7 +1208,7 @@ { "datasource": "prometheus", "editorMode": "code", - "expr": "sum by (pod_name, container_namespace) (irate(kepler_container_dram_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[1m])*($fosfactor/1000)*($ecofactor/1000))", + "expr": "sum by (pod_name, container_namespace) (irate(kepler_container_dram_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[5m])*($fosfactor/1000)*($ecofactor/1000))", "hide": false, "interval": "", "legendFormat": "{{pod_name}} / {{container_namespace}} / DRAM", @@ -1221,7 +1221,7 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "sum by (pod_name, container_namespace) (irate(kepler_container_other_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[1m])*($fosfactor/1000)*($ecofactor/1000))", + "expr": "sum by (pod_name, container_namespace) (irate(kepler_container_other_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[5m])*($fosfactor/1000)*($ecofactor/1000))", "hide": false, "interval": "", "legendFormat": "{{pod_name}} / {{container_namespace}} / OTHER", @@ -1234,7 +1234,7 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "sum by (pod_name, container_namespace) (irate(kepler_container_gpu_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[1m])*($fosfactor/1000)*($ecofactor/1000))", + "expr": "sum by (pod_name, container_namespace) (irate(kepler_container_gpu_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[5m])*($fosfactor/1000)*($ecofactor/1000))", "hide": false, "legendFormat": "{{pod_name}} / {{container_namespace}} / GPU", "range": true, @@ -1393,7 +1393,7 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "sum(irate(kepler_container_package_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[1m]))", + "expr": "sum(irate(kepler_container_package_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[5m]))", "hide": false, "interval": "", "legendFormat": "PKG", @@ -1406,7 +1406,7 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "sum(irate(kepler_container_dram_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[1m]))", + "expr": "sum(irate(kepler_container_dram_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[5m]))", "hide": false, "interval": "", "legendFormat": "DRAM", @@ -1419,7 +1419,7 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "sum(irate(kepler_container_other_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[1m]))", + "expr": "sum(irate(kepler_container_other_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[5m]))", "hide": false, "legendFormat": "OTHER", "range": true, @@ -1431,7 +1431,7 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "sum(irate(kepler_container_gpu_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[1m]))", + "expr": "sum(irate(kepler_container_gpu_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[5m]))", "hide": false, "legendFormat": " GPU", "range": true, @@ -1696,7 +1696,7 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "sum by (container_namespace) (\n increase(\n (kepler_container_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[24h:1m])\n )\n) * $watt_per_second_to_kWh ", + "expr": "sum by (container_namespace) (\\n (\\n increase(kepler_container_dram_joules_total{container_namespace=~\\\"$namespace\\\", pod_name=~\\\"$pod\\\"}[24h:1m]) +\\n increase(kepler_container_other_joules_total{container_namespace=~\\\"$namespace\\\", pod_name=~\\\"$pod\\\"}[24h:1m]) +\\n increase(kepler_container_package_joules_total{container_namespace=~\\\"$namespace\\\", pod_name=~\\\"$pod\\\"}[24h:1m])\\n ) * $watt_per_second_to_kWh\\n)\\n\"", "interval": "", "legendFormat": "{{container_namespace}}", "range": true, diff --git a/chart/files/kepler-dashboard.json b/chart/files/kepler-dashboard.json index aa19abc..6f6a737 100644 --- a/chart/files/kepler-dashboard.json +++ b/chart/files/kepler-dashboard.json @@ -296,7 +296,7 @@ { "datasource": "prometheus", "editorMode": "code", - "expr": "sum by (pod_name, container_namespace) (irate(kepler_container_package_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[1m]))", + "expr": "sum by (pod_name, container_namespace) (irate(kepler_container_package_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[5m]))", "hide": false, "interval": "", "legendFormat": "{{pod_name}} / {{container_namespace}} / PKG", @@ -306,7 +306,7 @@ { "datasource": "prometheus", "editorMode": "code", - "expr": "sum by (pod_name, container_namespace) (irate(kepler_container_dram_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[1m]))", + "expr": "sum by (pod_name, container_namespace) (irate(kepler_container_dram_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[5m]))", "hide": false, "interval": "", "legendFormat": "{{pod_name}} / {{container_namespace}} / DRAM", @@ -319,7 +319,7 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "sum by (pod_name, container_namespace) (irate(kepler_container_other_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[1m]))", + "expr": "sum by (pod_name, container_namespace) (irate(kepler_container_other_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[5m]))", "hide": false, "interval": "", "legendFormat": "{{pod_name}} / {{container_namespace}} / OTHER", @@ -332,7 +332,7 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "sum by (pod_name, container_namespace) (irate(kepler_container_gpu_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[1m]))", + "expr": "sum by (pod_name, container_namespace) (irate(kepler_container_gpu_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[5m]))", "hide": false, "legendFormat": "{{pod_name}} / {{container_namespace}} / GPU", "range": true, @@ -491,7 +491,7 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "sum(irate(kepler_container_package_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[1m]))", + "expr": "sum(irate(kepler_container_package_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[5m]))", "hide": false, "interval": "", "legendFormat": "PKG", @@ -504,7 +504,7 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "sum(irate(kepler_container_dram_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[1m]))", + "expr": "sum(irate(kepler_container_dram_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[5m]))", "hide": false, "interval": "", "legendFormat": "DRAM", @@ -517,7 +517,7 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "sum(irate(kepler_container_other_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[1m]))", + "expr": "sum(irate(kepler_container_other_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[5m]))", "hide": false, "legendFormat": "OTHER", "range": true, @@ -529,7 +529,7 @@ "uid": "${datasource}" }, "editorMode": "code", - "expr": "sum(irate(kepler_container_gpu_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[1m]))", + "expr": "sum(irate(kepler_container_gpu_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[5m]))", "hide": false, "legendFormat": " GPU", "range": true,