{ "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": 2, "links": [], "liveNow": false, "panels": [ { "collapsed": false, "datasource": "prometheus", "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 }, "id": 11, "panels": [], "title": "Carbon Emissions", "type": "row" }, { "datasource": { "type": "prometheus", "uid": "${datasource}" }, "description": "Using CO2 emissions by power generation type as reported by US Energy Information Administration https://www.eia.gov/tools/faqs/faq.php?id=74&t=11", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "percentage", "steps": [ { "color": "green", "value": null }, { "color": "#EAB839", "value": 60 }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "gridPos": { "h": 6, "w": 19, "x": 2, "y": 1 }, "id": 12, "options": { "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showThresholdLabels": false, "showThresholdMarkers": true, "text": {} }, "pluginVersion": "9.1.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 \n) * $coal", "hide": false, "legendFormat": "CO2 Coal", "range": true, "refId": "A" }, { "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 \n) * $petroleum", "hide": false, "legendFormat": "CO2 Petroleum", "range": true, "refId": "B" }, { "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 \n) * $natural_gas", "hide": false, "legendFormat": "CO2 Natural Gas", "range": true, "refId": "C" } ], "title": "Carbon Footprint (pounds per kWh per day) in Namespace: $namespace (PKG+DRAM+OTHER+GPU)", "transparent": true, "type": "gauge" }, { "collapsed": false, "datasource": "prometheus", "gridPos": { "h": 1, "w": 24, "x": 0, "y": 7 }, "id": 8, "panels": [], "title": "Power Consumption", "type": "row" }, { "datasource": { "type": "prometheus", "uid": "${datasource}" }, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "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 }, "lineInterpolation": "linear", "lineWidth": 0, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "always", "spanNulls": false, "stacking": { "group": "A", "mode": "normal" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] } }, "overrides": [ { "matcher": { "id": "byRegexp", "options": ".*DRAM.*" }, "properties": [ { "id": "color", "value": { "fixedColor": "orange", "mode": "fixed" } } ] }, { "matcher": { "id": "byRegexp", "options": ".*OTHER.*" }, "properties": [ { "id": "color", "value": { "fixedColor": "blue", "mode": "fixed" } } ] }, { "matcher": { "id": "byRegexp", "options": ".*GPU.*" }, "properties": [ { "id": "color", "value": { "fixedColor": "semi-dark-green", "mode": "fixed" } } ] }, { "matcher": { "id": "byRegexp", "options": ".*PKG.*" }, "properties": [ { "id": "color", "value": { "fixedColor": "red", "mode": "fixed" } } ] } ] }, "gridPos": { "h": 10, "w": 24, "x": 0, "y": 8 }, "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 (pod_name, container_namespace) (irate(kepler_container_package_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[1m]))", "hide": false, "interval": "", "legendFormat": "{{pod_name}} / {{container_namespace}} / PKG", "range": true, "refId": "A" }, { "datasource": "prometheus", "editorMode": "code", "expr": "sum by (pod_name, container_namespace) (irate(kepler_container_dram_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[1m]))", "hide": false, "interval": "", "legendFormat": "{{pod_name}} / {{container_namespace}} / DRAM", "range": true, "refId": "B" }, { "datasource": { "type": "prometheus", "uid": "${datasource}" }, "editorMode": "code", "expr": "sum by (pod_name, container_namespace) (irate(kepler_container_other_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[1m]))", "hide": false, "interval": "", "legendFormat": "{{pod_name}} / {{container_namespace}} / OTHER", "range": true, "refId": "C" }, { "datasource": { "type": "prometheus", "uid": "${datasource}" }, "editorMode": "code", "expr": "sum by (pod_name, container_namespace) (irate(kepler_container_gpu_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[1m]))", "hide": false, "legendFormat": "{{pod_name}} / {{container_namespace}} / GPU", "range": true, "refId": "D" } ], "title": "Pod/Process Power Consumption (W) in Namespace: $namespace", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "${datasource}" }, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "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 }, "lineInterpolation": "linear", "lineWidth": 0, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "always", "spanNulls": false, "stacking": { "group": "A", "mode": "normal" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] } }, "overrides": [ { "matcher": { "id": "byRegexp", "options": ".*Package.*" }, "properties": [ { "id": "color", "value": { "fixedColor": "red", "mode": "fixed" } } ] }, { "matcher": { "id": "byRegexp", "options": ".*DRAM.*" }, "properties": [ { "id": "color", "value": { "fixedColor": "orange", "mode": "fixed" } } ] }, { "matcher": { "id": "byRegexp", "options": ".*OtherComponents.*" }, "properties": [ { "id": "color", "value": { "fixedColor": "blue", "mode": "fixed" } } ] }, { "matcher": { "id": "byRegexp", "options": ".*GPU.*" }, "properties": [ { "id": "color", "value": { "fixedColor": "semi-dark-green", "mode": "fixed" } } ] } ] }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 18 }, "id": 2, "options": { "legend": { "calcs": [ "mean", "max" ], "displayMode": "table", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "${datasource}" }, "editorMode": "code", "expr": "sum(irate(kepler_container_package_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[1m]))", "hide": false, "interval": "", "legendFormat": "PKG", "range": true, "refId": "A" }, { "datasource": { "type": "prometheus", "uid": "${datasource}" }, "editorMode": "code", "expr": "sum(irate(kepler_container_dram_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[1m]))", "hide": false, "interval": "", "legendFormat": "DRAM", "range": true, "refId": "B" }, { "datasource": { "type": "prometheus", "uid": "${datasource}" }, "editorMode": "code", "expr": "sum(irate(kepler_container_other_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[1m]))", "hide": false, "legendFormat": "OTHER", "range": true, "refId": "C" }, { "datasource": { "type": "prometheus", "uid": "${datasource}" }, "editorMode": "code", "expr": "sum(irate(kepler_container_gpu_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[1m]))", "hide": false, "legendFormat": " GPU", "range": true, "refId": "D" } ], "title": "Total Power Consumption (W) in Namespace: $namespace", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "${datasource}" }, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "kWh", "axisPlacement": "left", "barAlignment": 0, "drawStyle": "bars", "fillOpacity": 44, "gradientMode": "opacity", "hideFrom": { "graph": false, "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "linear", "lineWidth": 0, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "always", "spanNulls": false, "stacking": { "group": "A", "mode": "normal" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] } }, "overrides": [ { "matcher": { "id": "byRegexp", "options": ".*Package.*" }, "properties": [ { "id": "color", "value": { "fixedColor": "red", "mode": "fixed" } } ] }, { "matcher": { "id": "byRegexp", "options": ".*DRAM.*" }, "properties": [ { "id": "color", "value": { "fixedColor": "orange", "mode": "fixed" } } ] }, { "matcher": { "id": "byRegexp", "options": ".*OtherComponents.*" }, "properties": [ { "id": "color", "value": { "fixedColor": "blue", "mode": "fixed" } } ] }, { "matcher": { "id": "byRegexp", "options": ".*GPU.*" }, "properties": [ { "id": "color", "value": { "fixedColor": "semi-dark-green", "mode": "fixed" } } ] } ] }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 18 }, "id": 17, "options": { "legend": { "calcs": [ "mean", "max" ], "displayMode": "table", "placement": "bottom", "showLegend": true, "sortBy": "Max", "sortDesc": true }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "${datasource}" }, "editorMode": "code", "expr": "sum (\n increase(\n (kepler_container_package_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[24h:1m])\n )\n) * $watt_per_second_to_kWh", "hide": false, "interval": "", "legendFormat": "PKG (CORE+UNCORE)", "range": true, "refId": "A" }, { "datasource": { "type": "prometheus", "uid": "${datasource}" }, "editorMode": "code", "expr": "sum (\n increase(\n (kepler_container_dram_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[24h:1m])\n )\n) * $watt_per_second_to_kWh", "hide": false, "interval": "", "legendFormat": "DRAM", "range": true, "refId": "B" }, { "datasource": { "type": "prometheus", "uid": "${datasource}" }, "editorMode": "code", "expr": "sum (\n increase(\n (kepler_container_other_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[24h:1m])\n )\n) * $watt_per_second_to_kWh", "hide": false, "legendFormat": "OTHER", "range": true, "refId": "C" }, { "datasource": { "type": "prometheus", "uid": "${datasource}" }, "editorMode": "code", "expr": "sum (\n increase(\n (kepler_container_gpu_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[24h:1m])\n )\n) * $watt_per_second_to_kWh", "hide": false, "legendFormat": " GPU", "range": true, "refId": "D" } ], "title": "Total Power Consumption (kWh per day) in Namespace: $namespace", "type": "timeseries" }, { "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": 7, "w": 24, "x": 0, "y": 26 }, "id": 15, "options": { "displayMode": "gradient", "minVizHeight": 10, "minVizWidth": 0, "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showUnfilled": true }, "pluginVersion": "9.1.0", "targets": [ { "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 ", "interval": "", "legendFormat": "{{container_namespace}}", "range": true, "refId": "A" } ], "title": "Total Power Consumption (PKG+DRAM+OTHER+GPU) by Namespace (kWh per day)", "type": "bargauge" } ], "refresh": "", "schemaVersion": 37, "style": "dark", "tags": [], "templating": { "list": [ { "current": { "selected": true, "text": "Prometheus-Kepler", "value": "Prometheus-Kepler" }, "hide": 0, "includeAll": false, "multi": false, "name": "datasource", "options": [], "query": "prometheus", "queryValue": "", "refresh": 1, "regex": "", "skipUrlSync": false, "type": "datasource" }, { "allValue": ".*", "current": { "selected": false, "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": false, "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 }, { "current": { "selected": false, "text": "2.23", "value": "2.23" }, "hide": 0, "label": "Coal Coeff", "name": "coal", "options": [ { "selected": true, "text": "2.23", "value": "2.23" } ], "query": "2.23", "skipUrlSync": false, "type": "textbox" }, { "current": { "selected": false, "text": "0.91", "value": "0.91" }, "hide": 0, "label": "Natural Gas Coeff", "name": "natural_gas", "options": [ { "selected": true, "text": "0.91", "value": "0.91" } ], "query": "0.91", "skipUrlSync": false, "type": "textbox" }, { "current": { "selected": false, "text": "2.13", "value": "2.13" }, "hide": 0, "label": "Petroleum Coeff", "name": "petroleum", "options": [ { "selected": true, "text": "2.13", "value": "2.13" } ], "query": "2.13", "skipUrlSync": false, "type": "textbox" }, { "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" } ] }, "time": { "from": "now-15m", "to": "now" }, "timepicker": {}, "timezone": "browser", "title": "Kepler Exporter Dashboard", "uid": "NhnADUW4zIBM", "version": 1, "weekStart": "" }