Skip to content

Commit

Permalink
fix: fixed last dashboards and removed double escapes
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 493d50e commit d79aaf0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion chart/files/caas-carbon-dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -1696,7 +1696,7 @@
"uid": "${datasource}"
},
"editorMode": "code",
"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\"",
"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)",
"interval": "",
"legendFormat": "{{container_namespace}}",
"range": true,
Expand Down
8 changes: 4 additions & 4 deletions chart/files/kepler-dashboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
"uid": "${datasource}"
},
"editorMode": "code",
"expr": "( sum(\n increase(\n (kepler_container_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[24h:1m])\n )\n ) * $watt_per_second_to_kWh \n) * $coal",
"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 * $coal\n)\n",
"hide": false,
"legendFormat": "CO2 Coal",
"range": true,
Expand All @@ -112,7 +112,7 @@
"uid": "${datasource}"
},
"editorMode": "code",
"expr": "( sum(\n increase(\n (kepler_container_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[24h:1m])\n )\n ) * $watt_per_second_to_kWh \n) * $petroleum",
"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 * $petroleum\n)\n",
"hide": false,
"legendFormat": "CO2 Petroleum",
"range": true,
Expand All @@ -124,7 +124,7 @@
"uid": "${datasource}"
},
"editorMode": "code",
"expr": "( sum(\n increase(\n (kepler_container_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[24h:1m])\n )\n ) * $watt_per_second_to_kWh \n) * $natural_gas",
"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 * $natural_gas\n)\n",
"hide": false,
"legendFormat": "CO2 Natural Gas",
"range": true,
Expand Down Expand Up @@ -794,7 +794,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)",
"interval": "",
"legendFormat": "{{container_namespace}}",
"range": true,
Expand Down

0 comments on commit d79aaf0

Please sign in to comment.