{ "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 (corrigido para $namespace/$pod e $__range)", "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, "id": null, "links": [], "liveNow": false, "panels": [ { "type": "row", "title": "Power & Energy", "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 }, "collapsed": false, "panels": [], "datasource": null, "id": 100 }, { "type": "timeseries", "title": "Pod/Process Power (W) in Namespace: $namespace", "id": 101, "datasource": { "type": "prometheus", "uid": "${datasource}" }, "gridPos": { "h": 10, "w": 24, "x": 0, "y": 1 }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "drawStyle": "bars", "lineWidth": 0, "fillOpacity": 44, "barAlignment": 0, "gradientMode": "opacity", "lineInterpolation": "linear", "spanNulls": false, "showPoints": "never", "stacking": { "mode": "normal", "group": "A" }, "axisPlacement": "left", "axisLabel": "W" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, { "color": "red", "value": 80 } ] } }, "overrides": [ { "matcher": { "id": "byRegexp", "options": ". / PKG$" }, "properties": [ { "id": "color", "value": { "mode": "fixed", "fixedColor": "red" } } ] }, { "matcher": { "id": "byRegexp", "options": ". / DRAM$" }, "properties": [ { "id": "color", "value": { "mode": "fixed", "fixedColor": "orange" } } ] }, { "matcher": { "id": "byRegexp", "options": ". / OTHER$" }, "properties": [ { "id": "color", "value": { "mode": "fixed", "fixedColor": "blue" } } ] }, { "matcher": { "id": "byRegexp", "options": ". / GPU$" }, "properties": [ { "id": "color", "value": { "mode": "fixed", "fixedColor": "semi-dark-green" } } ] } ] }, "options": { "legend": { "displayMode": "table", "placement": "right", "showLegend": true, "calcs": [ "mean" ], "sortBy": "Mean", "sortDesc": true }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "refId": "A", "editorMode": "code", "expr": "sum by (pod_name, container_namespace) ( irate(kepler_container_package_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\", mode=\"dynamic\"}[1m]) )", "legendFormat": "{{pod_name}} / {{container_namespace}} / PKG", "range": true, "datasource": { "type": "prometheus", "uid": "${datasource}" } }, { "refId": "B", "editorMode": "code", "expr": "sum by (pod_name, container_namespace) ( irate(kepler_container_dram_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[1m]) )", "legendFormat": "{{pod_name}} / {{container_namespace}} / DRAM", "range": true, "datasource": { "type": "prometheus", "uid": "${datasource}" } }, { "refId": "C", "editorMode": "code", "expr": "sum by (pod_name, container_namespace) ( irate(kepler_container_other_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[1m]) )", "legendFormat": "{{pod_name}} / {{container_namespace}} / OTHER", "range": true, "datasource": { "type": "prometheus", "uid": "${datasource}" } }, { "refId": "D", "editorMode": "code", "expr": "sum by (pod_name, container_namespace) ( irate(kepler_container_gpu_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[1m]) )", "legendFormat": "{{pod_name}} / {{container_namespace}} / GPU", "range": true, "datasource": { "type": "prometheus", "uid": "${datasource}" } } ] }, { "type": "timeseries", "title": "Node Power (W) – platform", "id": 102, "datasource": { "type": "prometheus", "uid": "${datasource}" }, "gridPos": { "h": 6, "w": 24, "x": 0, "y": 11 }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "drawStyle": "line", "lineWidth": 1, "spanNulls": true, "axisPlacement": "left", "axisLabel": "W" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "refId": "A", "editorMode": "code", "expr": "irate(kepler_node_platform_joules_total[1m])", "legendFormat": "{{instance}}", "range": true, "datasource": { "type": "prometheus", "uid": "${datasource}" } } ] }, { "type": "bargauge", "title": "Energy per Pod (J) – período do painel", "id": 103, "datasource": { "type": "prometheus", "uid": "${datasource}" }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 17 }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, { "color": "red", "value": 80 } ] }, "unit": "J" }, "overrides": [] }, "options": { "displayMode": "gradient", "minVizHeight": 10, "minVizWidth": 0, "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showUnfilled": true }, "targets": [ { "refId": "A", "editorMode": "code", "expr": "sum by (pod_name)( increase(kepler_container_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[$__range]) )", "legendFormat": "{{pod_name}}", "range": true, "datasource": { "type": "prometheus", "uid": "${datasource}" } } ] }, { "type": "stat", "title": "Total Energy (kWh) – período do painel", "id": 104, "datasource": { "type": "prometheus", "uid": "${datasource}" }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 17 }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, { "color": "red", "value": 0.1 } ] }, "unit": "kWh" }, "overrides": [] }, "options": { "colorMode": "value", "graphMode": "none", "justifyMode": "auto", "reduceOptions": { "values": false, "calcs": ["lastNotNull"], "fields": "" } }, "targets": [ { "refId": "A", "editorMode": "code", "expr": "sum( increase(kepler_container_joules_total{container_namespace=~\"$namespace\", pod_name=~\"$pod\"}[$__range]) ) * $watt_per_second_to_kWh", "legendFormat": "Total (pods filtrados)", "range": true, "datasource": { "type": "prometheus", "uid": "${datasource}" } } ] }, { "type": "bargauge", "title": "Total Energy by Namespace (kWh) – período do painel", "id": 105, "datasource": { "type": "prometheus", "uid": "${datasource}" }, "gridPos": { "h": 7, "w": 24, "x": 0, "y": 25 }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "options": { "displayMode": "gradient", "minVizHeight": 10, "minVizWidth": 0, "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showUnfilled": true }, "targets": [ { "refId": "A", "editorMode": "code", "expr": "sum by (container_namespace) ( increase(kepler_container_joules_total[$__range]) ) * $watt_per_second_to_kWh", "legendFormat": "{{container_namespace}}", "range": true, "datasource": { "type": "prometheus", "uid": "${datasource}" } } ] } ], "refresh": "10s", "schemaVersion": 37, "style": "dark", "tags": [ "kepler", "energy", "kubernetes" ], "templating": { "list": [ { "name": "datasource", "type": "datasource", "query": "prometheus", "current": { "selected": true, "text": "Prometheus-Kepler", "value": "Prometheus-Kepler" }, "hide": 0, "includeAll": false, "multi": false, "options": [], "refresh": 1, "regex": "", "skipUrlSync": false }, { "name": "namespace", "label": "Namespace", "type": "query", "datasource": { "type": "prometheus", "uid": "${datasource}" }, "definition": "label_values(kepler_container_joules_total, container_namespace)", "query": { "query": "label_values(kepler_container_joules_total, container_namespace)", "refId": "StandardVariableQuery" }, "includeAll": true, "allValue": ".*", "current": { "selected": true, "text": "All", "value": "$__all" }, "hide": 0, "multi": false, "options": [], "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 0 }, { "name": "pod", "label": "Pod", "type": "query", "datasource": { "type": "prometheus", "uid": "${datasource}" }, "definition": "label_values(kepler_container_package_joules_total{container_namespace=~\"$namespace\"}, pod_name)", "query": { "query": "label_values(kepler_container_package_joules_total{container_namespace=~\"$namespace\"}, pod_name)", "refId": "StandardVariableQuery" }, "includeAll": true, "allValue": ".*", "current": { "selected": true, "text": "All", "value": "$__all" }, "hide": 0, "multi": false, "options": [], "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 0 }, { "name": "watt_per_second_to_kWh", "type": "constant", "query": "0.000000277777777777778", "current": { "selected": true, "text": "0.000000277777777777778", "value": "0.000000277777777777778" }, "description": "1 Ws = 1 J; 1 J = 1/3,600,000 kWh", "hide": 2, "skipUrlSync": false } ] }, "time": { "from": "now-15m", "to": "now" }, "timepicker": {}, "timezone": "browser", "title": "Kepler Exporter Dashboard (corrigido)", "uid": "kepler-fixed", "version": 1, "weekStart": "" }