{ "annotations": { "list": [ { "builtIn": 1, "datasource": "-- Grafana --", "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", "target": { "limit": 100, "matchAny": false, "tags": [], "type": "dashboard" }, "type": "dashboard" } ] }, "description": "Dashboard for Kepler Exporter", "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, "id": 29, "links": [], "liveNow": false, "panels": [ { "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 }, "id": 18, "panels": [], "title": "mg CO2 per application", "type": "row" }, { "datasource": { "type": "prometheus", "uid": "${datasource}" }, "description": "The total emission per namespace is calculated by multiplying power consumption with the emission factor and power usage efficiency. ", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] } }, "overrides": [] }, "gridPos": { "h": 6, "w": 24, "x": 0, "y": 1 }, "id": 21, "options": { "displayMode": "gradient", "maxVizHeight": 300, "minVizHeight": 16, "minVizWidth": 8, "namePlacement": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showUnfilled": true, "sizing": "auto", "valueMode": "color" }, "pluginVersion": "10.4.0", "targets": [ { "datasource": "prometheus", "editorMode": "code", "expr": "( sum (increase(kepler_container_joules_total{container_namespace=~\"$namespace\",pod_name=~\"$pod\"}[24h:1m])) * $watt_per_second_to_kWh * $PUE ) * $emission_factor * 1000 * 100", "hide": false, "interval": "", "legendFormat": "Total", "range": true, "refId": "Total" }, { "datasource": "prometheus", "editorMode": "code", "expr": "( sum by (container_namespace) (increase(kepler_container_joules_total{container_namespace=~\"$namespace\",pod_name=~\"$pod\"}[24h:1m])) * $watt_per_second_to_kWh * $PUE ) * $emission_factor * 1000 * 100", "hide": false, "interval": "", "legendFormat": "{{container_namespace}}", "range": true, "refId": "Per namespace" } ], "title": "Total Daily Dynamic CO2 emissions (mg) per Namespace", "type": "bargauge" }, { "datasource": { "type": "prometheus", "uid": "${datasource}" }, "description": "The total emission per namespace is calculated by multiplying power consumption with emission factor and power usage efficiency. Per minute.", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "mg CO2", "axisPlacement": "left", "barAlignment": 0, "drawStyle": "bars", "fillOpacity": 44, "gradientMode": "opacity", "hideFrom": { "graph": false, "legend": false, "tooltip": false, "viz": false }, "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 0, "pointSize": 2, "scaleDistribution": { "type": "linear" }, "showPoints": "always", "spanNulls": false, "stacking": { "group": "A", "mode": "normal" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] } }, "overrides": [] }, "gridPos": { "h": 10, "w": 24, "x": 0, "y": 7 }, "id": 20, "options": { "legend": { "calcs": [ "mean" ], "displayMode": "table", "placement": "right", "showLegend": true, "sortBy": "Mean", "sortDesc": true }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": "prometheus", "editorMode": "code", "expr": "( sum by (container_namespace) (increase(kepler_container_joules_total{container_namespace=~\"$namespace\",}[1m])) * $watt_per_second_to_kWh * $PUE ) * $emission_factor * 1000 * 100", "hide": false, "interval": "", "legendFormat": "{{container_namespace}}", "range": true, "refId": "Total" } ], "title": "Total Dynamic CO2 emissions per Namespace", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "${datasource}" }, "description": "The total emission is calculated by multiplying power consumption with the emission factor and power usage efficiency. Value is per minute.", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "mg CO2", "axisPlacement": "left", "barAlignment": 0, "drawStyle": "bars", "fillOpacity": 44, "gradientMode": "opacity", "hideFrom": { "graph": false, "legend": false, "tooltip": false, "viz": false }, "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 0, "pointSize": 2, "scaleDistribution": { "type": "linear" }, "showPoints": "always", "spanNulls": false, "stacking": { "group": "A", "mode": "normal" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] } }, "overrides": [] }, "gridPos": { "h": 10, "w": 24, "x": 0, "y": 17 }, "id": 23, "options": { "legend": { "calcs": [ "mean" ], "displayMode": "table", "placement": "right", "showLegend": true, "sortBy": "Mean", "sortDesc": true }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": "prometheus", "editorMode": "code", "expr": "( sum by (container_namespace,pod_name) (increase(kepler_container_joules_total{container_namespace=~\"$namespace\",pod_name=~\"$pod\"}[1m])) * $watt_per_second_to_kWh * $PUE ) * $emission_factor * 1000 * 100", "hide": false, "interval": "", "legendFormat": "{{pod_name}} -- {{container_namespace}}", "range": true, "refId": "Total" } ], "title": "Dynamic CO2 emissions per Pod", "type": "timeseries" }, { "collapsed": false, "datasource": "prometheus", "gridPos": { "h": 1, "w": 24, "x": 0, "y": 27 }, "id": 8, "panels": [], "title": "Power Consumption", "type": "row" }, { "datasource": { "type": "prometheus", "uid": "${datasource}" }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "gridPos": { "h": 6, "w": 24, "x": 0, "y": 28 }, "id": 15, "options": { "displayMode": "gradient", "maxVizHeight": 300, "minVizHeight": 10, "minVizWidth": 0, "namePlacement": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showUnfilled": true, "sizing": "auto", "valueMode": "color" }, "pluginVersion": "10.4.0", "targets": [ { "datasource": { "type": "prometheus", "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 ", "interval": "", "legendFormat": "Total", "range": true, "refId": "Total" }, { "datasource": { "type": "prometheus", "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 ", "hide": false, "interval": "", "legendFormat": "{{container_namespace}}", "range": true, "refId": "B" } ], "title": "Total Dynamic Power Consumption by Namespace (kWh per day)", "type": "bargauge" }, { "datasource": { "type": "prometheus", "uid": "${datasource}" }, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "watt", "axisPlacement": "left", "barAlignment": 0, "drawStyle": "bars", "fillOpacity": 44, "gradientMode": "opacity", "hideFrom": { "graph": false, "legend": false, "tooltip": false, "viz": false }, "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 0, "pointSize": 2, "scaleDistribution": { "type": "linear" }, "showPoints": "always", "spanNulls": false, "stacking": { "group": "A", "mode": "normal" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] } }, "overrides": [] }, "gridPos": { "h": 10, "w": 24, "x": 0, "y": 34 }, "id": 16, "options": { "legend": { "calcs": [ "mean" ], "displayMode": "table", "placement": "right", "showLegend": true, "sortBy": "Mean", "sortDesc": true }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": "prometheus", "editorMode": "code", "expr": "sum by (container_namespace) (irate(kepler_container_joules_total{container_namespace=~\"$namespace\"}[1m]))", "hide": false, "interval": "", "legendFormat": "{{container_namespace}}", "range": true, "refId": "A" } ], "title": "Total Dynamic Power Consumption (W) per Namespace", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "${datasource}" }, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "watt", "axisPlacement": "left", "barAlignment": 0, "drawStyle": "bars", "fillOpacity": 44, "gradientMode": "opacity", "hideFrom": { "graph": false, "legend": false, "tooltip": false, "viz": false }, "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 0, "pointSize": 2, "scaleDistribution": { "type": "linear" }, "showPoints": "always", "spanNulls": false, "stacking": { "group": "A", "mode": "normal" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] } }, "overrides": [] }, "gridPos": { "h": 10, "w": 24, "x": 0, "y": 44 }, "id": 22, "options": { "legend": { "calcs": [ "mean" ], "displayMode": "table", "placement": "right", "showLegend": true, "sortBy": "Mean", "sortDesc": true }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": "prometheus", "editorMode": "code", "expr": "sum by (container_namespace,pod_name) (irate(kepler_container_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[1m]))", "hide": false, "interval": "", "legendFormat": "{{pod_name}} -- {{container_namespace}}", "range": true, "refId": "A" } ], "title": "Total Dynamic Power Consumption (W) per Pod", "type": "timeseries" } ], "refresh": "", "schemaVersion": 39, "tags": [], "templating": { "list": [ { "current": { "selected": true, "text": "prometheus", "value": "P1809F7CD0C75ACF3" }, "hide": 0, "includeAll": false, "multi": false, "name": "datasource", "options": [], "query": "prometheus", "queryValue": "", "refresh": 1, "regex": "", "skipUrlSync": false, "type": "datasource" }, { "allValue": ".*", "current": { "selected": true, "text": "All", "value": "$__all" }, "datasource": { "type": "prometheus", "uid": "${datasource}" }, "definition": "label_values(kepler_container_package_joules_total, container_namespace)", "description": "Namespace for pods to choose", "hide": 0, "includeAll": true, "label": "Namespace", "multi": false, "name": "namespace", "options": [], "query": { "query": "label_values(kepler_container_package_joules_total, container_namespace)", "refId": "StandardVariableQuery" }, "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 0, "tagValuesQuery": "", "tagsQuery": "", "type": "query", "useTags": false }, { "allValue": ".*", "current": { "selected": true, "text": "All", "value": "$__all" }, "datasource": { "type": "prometheus", "uid": "${datasource}" }, "definition": "label_values(kepler_container_package_joules_total{container_namespace=~\"$namespace\"}, pod_name)", "hide": 0, "includeAll": true, "label": "Pod", "multi": false, "name": "pod", "options": [], "query": { "query": "label_values(kepler_container_package_joules_total{container_namespace=~\"$namespace\"}, pod_name)", "refId": "StandardVariableQuery" }, "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 0, "tagValuesQuery": "", "tagsQuery": "", "type": "query", "useTags": false }, { "description": "1W*s = 1J and 1J = (1/3600000)kWh", "hide": 2, "label": "", "name": "watt_per_second_to_kWh", "query": "0.000000277777777777778", "skipUrlSync": false, "type": "constant" }, { "current": { "selected": false, "text": "0.000310", "value": "0.000310" }, "description": "metric ton CO2e per kWh in AWS eu-west-1 region", "hide": 0, "label": "Emission Factor", "name": "emission_factor", "options": [ { "selected": true, "text": "0.000310", "value": "0.000310" } ], "query": "0.000310", "skipUrlSync": false, "type": "textbox" }, { "current": { "selected": false, "text": "1.135", "value": "1.135" }, "description": "Average AWS PUE", "hide": 0, "label": "Power Usage Effectiveness", "name": "PUE", "options": [ { "selected": true, "text": "1.135", "value": "1.135" } ], "query": "1.135", "skipUrlSync": false, "type": "textbox" } ] }, "time": { "from": "now-1d", "to": "now" }, "timepicker": {}, "timezone": "browser", "title": "Annes Kepler Exporter Dashboard", "uid": "anneskepler", "version": 41, "weekStart": "" }