Skip to content

Commit

Permalink
fix: fix kepler-dashboards
Browse files Browse the repository at this point in the history
Signed-off-by: Bruno Bressi <[email protected]>
  • Loading branch information
puffitos committed Jan 25, 2024
1 parent 5a25f94 commit 493d50e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion chart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
26 changes: 13 additions & 13 deletions chart/files/caas-carbon-dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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,
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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,
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
16 changes: 8 additions & 8 deletions chart/files/kepler-dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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,
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 493d50e

Please sign in to comment.