diff --git a/embedded-visualization/Infrastructure/Sustainability/Application Carbon Footprint - Private Cloud - v3.6.json b/embedded-visualization/Infrastructure/Sustainability/Application Carbon Footprint - Private Cloud - v3.6.json new file mode 100644 index 0000000..a07368f --- /dev/null +++ b/embedded-visualization/Infrastructure/Sustainability/Application Carbon Footprint - Private Cloud - v3.6.json @@ -0,0 +1,2261 @@ +{ + "__inputs": [ + { + "name": "DS_TURBO_TIMESCALE", + "label": "Turbo Timescale", + "description": "", + "type": "datasource", + "pluginId": "postgres", + "pluginName": "PostgreSQL" + } + ], + "__elements": {}, + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "9.4.7" + }, + { + "type": "datasource", + "id": "postgres", + "name": "PostgreSQL", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "stat", + "name": "Stat", + "version": "" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + }, + { + "type": "panel", + "id": "text", + "name": "Text", + "version": "" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- 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": "Using the Carbon Metric from Turbonomic directly", + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 2, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 31, + "panels": [ + { + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 33 + }, + "id": 33, + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": "# **Applications Carbon Footprint - Private Cloud**\n***\n## **Summary**\nThis dashboard shows the impact of IBM Turbonomic application resource manager on Energy consumption and Carbon Footprint in your private cloud data center environment. \n\nThis dashboard focuses on the calculated Energy and Carbon Footprint data for Virtual Machines (VMs) running in a vSphere environment and includes Energy consumption and Carbon Footprint emissions for VMs, optimization opportunities and their associated net impact on resources, as well as a table comparison of Carbon Footprint across VM groups and Business Applications (see \"Top Applications by CO2e Emissions\" section).\n***\n\n## **Data and Methodology**\n---\n### Energy (Wh) \nVirtual Machine (VM) Energy consumption data is being calculated for individual VM based on the distribution of Host's power data among the VMs running on it. The following methodology is used to quantify Energy consumption for VMs:\n\nConsider the following notation:\n\n**n** - Number of VMs deployed on a Host\\\n**VM_i** - The i-th VM deployed on a Host\\\n**vCPU_i** - The number of vCPUs allocated to VM~i~ \\\n**P** - Total power consumed by the Host\\\n**U** - Total CPU utilization at the Host (due to hypervisor, OSs, and applications running on all the VMs) \\\n**u_i** - CPU utilization of VM~i~ \\\n**P_idle** - is the power consumed by the Host during active idle state when no process is actively executing \\\n**P_overhead** - is the power consumed due to the hypervisor or other processes that are not specific to any single VM\\\n**P_active** - is the power consumed by the OSs and user processes executing on the VMs \\ \n\n**Host power can be divided into 3 components:**\n\n P = P_idle + P_overhead + P_active\n\n**The instantaneous power at or over a time interval t for VM_i is then determined as follows:**\n\n P_VM_i = [(vCPU_i / ∑_(k=1)^n {vCPU_k}) * (P_idle + P_overhead)] + [(u_i / ∑_(k=1)^n {u_k}) * P_active]\n\n\n**Splitting total power into idle, overhead, and active components:** \n\nThe idle power of a Host is determined by fitting a model between the total host utilization U and host power P time series. \n\nThe overhead power P_overhead is given by the power consumption at overhead utilization less P_idle, given by [U - (∑_k{u_k})] . \n\nThat is - **P_overhead** = P * [U - (∑_k{u_k})] - P_idle.\n\n\nFollowing the aforementioned methodology we are able to calculate Power consumption for each individual VM that is running on a Host with available Power data. Then, we are converting Power data into Energy data and showing Energy in Wh units in the \"Energy Consumption (Wh)\" graphs. \n\n---\n### CO2e emissions (t)\nCalculations for Carbon Dioxide equivalents (CO2e in metric tons) emissions are made following an open source methodology outlined in Cloud Carbon Footprint website - [www.cloudcarbonfootprint.org](https://www.cloudcarbonfootprint.org/).\\\nSpecifically, in this dashboard CO2e are calculated using the following formula:\n\n Operational Emissions = CO2e (t) = (energy consumption [Wh]) x [(private cloud average PUE) x (private cloud emissions factor) / 1000]\n\nWhere:\n\n- ***Private Cloud Power Usage Effectiveness (PUE)*** = An average PUE of 1.67 is used in our calculations. This [451 report](https://d39w7f4ix9f5s9.cloudfront.net/e3/79/42bf75c94c279c67d777f002051f/carbon-reduction-opportunity-of-moving-to-aws.pdf) notes: \"Adding it all up, the power usage effectiveness (PUE, the ratio of total datacenter power and the IT power) ranged from 1.63 to 1.70 in the survey sample and was consistent across company sizes. This is in line with broader industry data collected by the Uptime Institute but well below the efficiency of AWS operations.\" - 451 Research Report. We use the average of 1.63 and 1.70, which is 1.67.\n\n- ***Private Cloud Emissions Factor*** = `1,562.4 lbs CO2/MWh × (4.536 × 10^(-4) metric tons/lb) × 0.001 MWh/kWh = 7.09 × 10^(-4) metric tons CO2/kWh`. We are using `0.000709` (rounded) in our calculations. ***Note:*** Emission equivalents vary slightly vs. EPA calculation because we are using the rounded numbers of the emissions factor (7.09x10^(-4)).\n\n---\n### Graphs and dashboard functionality\n\n- **Top Applications by CO2e emissions** - this table shows the total CO2e emissions over the chosen dashboard period for groups of VMs that are manually created by end users in Turbonomic as well as total CO2e emissions over the chosen dashboard period for VMs within Business Applications groups that are discovred by APM targets added to Turbonomic such as Dynatrace, AppDynamics, Instana, etc.\n\n- **Total Number of VMs** - this graph shows the total number of VMs, both active and idle, discovered by Turbonomnic. \n\n- **Current Number of Resize Actions** - this graph shows the total number VM optimization opportunities, also know as pending VM Resize actions in Turbonomic.\n\n- **VM Resize Actions Impact on VCPU** - this graph shows the net impact on VCPU resources from all the pending VM Resize actions in Turbonomic. \n\n- **VM Resize Actions Impact on VMem** - this graph shows the net impact on VMEM resources from all the pending VM Resize actions in Turbonomic. \n\n- **Global** and **Scoped Information** sections:\n - **Global** - this section includes inforamation of the global environment over the selected period of time\n - **Scoped Information** - this section shows information of the scoped environment which can be controlled by the dashboard's top scope selectors such as \"Data Center\" , \"Application(s)\", and \"Virtual Machine(s)\". For each scope selector, one or multiple entries may be selected. \n\n- **PUE** and **Emissions Factor** - these parameters can be adjusted by the user of this dashboard and impact the calculated CO2e in various graphs of this dashboard. See \"CO2e emissions (t)\" section.\n\n\n", + "mode": "markdown" + }, + "pluginVersion": "9.4.7", + "title": "Read Me", + "type": "text" + } + ], + "title": "Help", + "type": "row" + }, + { + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 1 + }, + "id": 19, + "title": "Global", + "type": "row" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "description": "This shows the latest data point for the total number of VMs in the selected scope.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "light-blue", + "mode": "fixed" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 3, + "x": 0, + "y": 2 + }, + "id": 15, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "/^count$/", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "editorMode": "code", + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n m.\"time\" as \"time\",\n count(m.current)\nFROM metric m\nWHERE\n $__timeFilter(m.\"time\") AND\n m.entity_oid IN (${VM_ENERGY_LIST}) AND\n m.type = 'ENERGY'\nGROUP BY m.time\nORDER BY 1\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "savings" + ], + "type": "column" + } + ] + ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "completed_action", + "timeColumn": "recommendation_time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "title": "Total Number of VMs", + "type": "stat" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "description": "Current number of pending VM Resize actions. ", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "dark-yellow", + "mode": "fixed" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 3, + "x": 3, + "y": 2 + }, + "id": 26, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "/^count$/", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "editorMode": "code", + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n count(*)\nFROM pending_action a\nwhere\na.type = 'RESIZE' AND\na.target_entity_id IN (${VM_ENERGY_LIST})", + "refId": "A", + "select": [ + [ + { + "params": [ + "savings" + ], + "type": "column" + } + ] + ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "completed_action", + "timeColumn": "recommendation_time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "title": "Current Number of Resize Actions", + "type": "stat" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "description": "Net impact on vCPU resources from pending VM Resize Actions.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "semi-dark-yellow", + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 0 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 3, + "x": 6, + "y": 2 + }, + "id": 25, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "sum" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "editorMode": "code", + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\r\n (a.attrs->'resizeInfo'->'VCPU'->>'to')::float - (a.attrs->'resizeInfo'->'VCPU'->>'from')::float as \"Difference\"\r\nFROM pending_action a\r\nwhere\r\n a.target_entity_id IN (${VM_ENERGY_LIST}) AND\r\n a.\"type\" = 'RESIZE' AND\r\n a.description like '%VCPU%' AND a.description not like '%limit%'\r\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "savings" + ], + "type": "column" + } + ] + ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "completed_action", + "timeColumn": "recommendation_time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "title": "VM Resize Actions Impact on VCPU", + "type": "stat" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "description": "Net impact on vMem resources from pending VM Resize Actions.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "semi-dark-yellow", + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 0 + } + ] + }, + "unit": "deckbytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 3, + "x": 9, + "y": 2 + }, + "id": 27, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "sum" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "editorMode": "code", + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\r\n (a.attrs->'resizeInfo'->'VMEM'->>'to')::float - (a.attrs->'resizeInfo'->'VMEM'->>'from')::float as \"Difference\"\r\nFROM pending_action a\r\nwhere\r\n a.target_entity_id IN (${VM_ENERGY_LIST}) AND\r\n a.\"type\" = 'RESIZE' AND\r\n a.description like '%VMem%'", + "refId": "A", + "select": [ + [ + { + "params": [ + "savings" + ], + "type": "column" + } + ] + ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "completed_action", + "timeColumn": "recommendation_time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "title": "VM Resize Actions Impact on VMem", + "type": "stat" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "description": "List of all applications in the selected scope sorted by the ones with the most carbon emissions over the selected period at the top. Carbon emissions associated with application groups are of the VMs that are part of each application group. ", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": true, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "purple", + "value": null + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "CO2e (t)" + }, + "properties": [ + { + "id": "unit", + "value": "masst" + }, + { + "id": "custom.cellOptions", + "value": { + "mode": "gradient", + "type": "gauge" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Grouping Type" + }, + "properties": [ + { + "id": "custom.width", + "value": 130 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Application Name" + }, + "properties": [ + { + "id": "custom.width", + "value": 274 + } + ] + } + ] + }, + "gridPos": { + "h": 23, + "w": 12, + "x": 12, + "y": 2 + }, + "id": 14, + "options": { + "footer": { + "countRows": false, + "enablePagination": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": true + }, + "frameIndex": 1, + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "CO2e (t)" + } + ] + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "editorMode": "code", + "format": "table", + "group": [], + "hide": false, + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n concat(eapp.name, ' (', eapp.oid,')') as \"Application Name\",\n eapp.oid as \"Application OID\",\n s.scoped_oid as \"VM OID\",\n eapp.type as \"Grouping Type\"\nFROM scope s\njoin entity eapp on eapp.oid = s.seed_oid\nwhere\n s.scoped_type = 'VIRTUAL_MACHINE'\n AND s.finish > now()\n AND eapp.last_seen > now()\n AND ((eapp.type = 'GROUP' AND eapp.attrs->'member_types' ? 'VIRTUAL_MACHINE' AND '${INCLUDE_GROUPS}') OR (eapp.type = 'BUSINESS_APPLICATION'))\nORDER BY 1", + "refId": "Groups", + "select": [ + [ + { + "params": [ + "savings" + ], + "type": "column" + } + ] + ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "completed_action", + "timeColumn": "recommendation_time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "editorMode": "code", + "format": "table", + "group": [], + "hide": false, + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n --mvm.time as \"Time\",\n mvm.entity_oid as \"VM OID\",\n sum(mvm.current)/1000/1000 as \"CO2e (t)\"\nFROM metric mvm\nwhere \n $__timeFilter(mvm.time) AND\n mvm.entity_oid IN (${VM_ENERGY_LIST}) AND\n mvm.entity_type = 'VIRTUAL_MACHINE' AND\n mvm.type = 'CARBON'\nGROUP BY \"VM OID\"\nORDER BY 1", + "refId": "VM metrics", + "select": [ + [ + { + "params": [ + "savings" + ], + "type": "column" + } + ] + ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "completed_action", + "timeColumn": "recommendation_time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "title": "Top Applications by CO2e emissions", + "transformations": [ + { + "id": "merge", + "options": {} + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Application OID": true, + "VM OID": true + }, + "indexByName": {}, + "renameByName": {} + } + }, + { + "id": "groupBy", + "options": { + "fields": { + "Application Name": { + "aggregations": [], + "operation": "groupby" + }, + "Application OID": { + "aggregations": [], + "operation": "groupby" + }, + "CO2e (t)": { + "aggregations": [ + "sum" + ], + "operation": "aggregate" + }, + "Carbon Footprint (kg of CO2)": { + "aggregations": [ + "sum" + ], + "operation": "aggregate" + }, + "Grouping Type": { + "aggregations": [], + "operation": "groupby" + } + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Application OID": false + }, + "indexByName": {}, + "renameByName": { + "CO2e (t) (sum)": "CO2e (t)", + "Carbon Footprint (kg of CO2) (sum)": "Carbon Footprint (kg of CO2)" + } + } + }, + { + "id": "sortBy", + "options": { + "fields": {}, + "sort": [ + { + "desc": true, + "field": "CO2e (t)" + } + ] + } + }, + { + "id": "filterByValue", + "options": { + "filters": [ + { + "config": { + "id": "isNull", + "options": {} + }, + "fieldName": "Application Name" + } + ], + "match": "any", + "type": "exclude" + } + } + ], + "type": "table" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "description": "Shows the total energy consumption in Wh for VMs in the selected scope and over the selected time period. ", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "orange", + "mode": "fixed" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "watth" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 7 + }, + "id": 21, + "options": { + "legend": { + "calcs": [ + "mean", + "sum" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.5.16", + "targets": [ + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "editorMode": "code", + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n m.\"time\" as \"time\",\n sum(m.current)\nFROM metric m\n--JOIN entity e on m.entity_oid = e.\"oid\" AND e.environment = 'ON_PREM' AND e.type = 'VIRTUAL_MACHINE' and m.entity_type = e.type\nWHERE\n $__timeFilter(m.\"time\") AND\n m.entity_oid IN (${VM_ENERGY_LIST}) AND\n m.type = 'ENERGY'\nGROUP BY m.time\nORDER BY 1", + "refId": "A", + "select": [ + [ + { + "params": [ + "savings" + ], + "type": "column" + } + ] + ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "completed_action", + "timeColumn": "recommendation_time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "title": "Total Energy Consumption (Wh) - All VMs", + "type": "timeseries" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "description": "Shows the total carbon footprint in tons of CO2e emissions for VMs in the selected scope and over the selected time period. ", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "purple", + "mode": "fixed" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "masst" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 16 + }, + "id": 7, + "options": { + "legend": { + "calcs": [ + "mean", + "sum" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.5.16", + "targets": [ + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "editorMode": "code", + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n m.\"time\" as \"time\",\n sum(m.current)/1000/1000 as \"CO2e (t)\"\nFROM metric m\n--JOIN entity e on m.entity_oid = e.\"oid\" AND e.environment = 'ON_PREM' AND e.type = 'VIRTUAL_MACHINE' and m.entity_type = e.type\nWHERE\n $__timeFilter(m.\"time\") AND\n m.entity_oid IN (${VM_ENERGY_LIST}) AND\n m.type = 'CARBON'\nGROUP BY m.time\nORDER BY 1", + "refId": "A", + "select": [ + [ + { + "params": [ + "savings" + ], + "type": "column" + } + ] + ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "completed_action", + "timeColumn": "recommendation_time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "title": "Total Carbon Footprint CO2e (t) - All VMs", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 25 + }, + "id": 17, + "panels": [], + "title": "Scoped Information", + "type": "row" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "description": "This shows the latest data point for the total number of VMs in the selected scope.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "light-blue", + "mode": "fixed" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 3, + "x": 0, + "y": 26 + }, + "id": 29, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "/^count$/", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "editorMode": "code", + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n m.\"time\" as \"time\",\n count(m.current)\nFROM metric m\nWHERE\n $__timeFilter(m.\"time\") AND\n m.entity_oid IN (${VM_LIST}) AND\n m.type = 'ENERGY'\nGROUP BY m.time\nORDER BY 1\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "savings" + ], + "type": "column" + } + ] + ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "completed_action", + "timeColumn": "recommendation_time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "title": "Total Number of VMs", + "type": "stat" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "description": "Current Number of pending VM Resize Actions for all the VMs in the selected scope.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "dark-yellow", + "mode": "fixed" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 3, + "x": 3, + "y": 26 + }, + "id": 28, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "/^count$/", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "editorMode": "code", + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n count(*)\nFROM pending_action a\nwhere\na.type = 'RESIZE' AND\na.target_entity_id IN (${VM_LIST})", + "refId": "A", + "select": [ + [ + { + "params": [ + "savings" + ], + "type": "column" + } + ] + ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "completed_action", + "timeColumn": "recommendation_time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "title": "Current Number of Resize Actions", + "type": "stat" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "description": "Net impact on vCPU resources from pending VM Resize Actions in the selected scope.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "semi-dark-yellow", + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 0 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 3, + "x": 6, + "y": 26 + }, + "id": 23, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "sum" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "editorMode": "code", + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\r\n (a.attrs->'resizeInfo'->'VCPU'->>'to')::float - (a.attrs->'resizeInfo'->'VCPU'->>'from')::float as \"Difference\"\r\nFROM pending_action a\r\nwhere\r\n a.target_entity_id IN (${VM_LIST}) AND\r\n a.\"type\" = 'RESIZE' AND\r\n a.description like '%VCPU%' AND a.description not like '%limit%'\r\n", + "refId": "A", + "select": [ + [ + { + "params": [ + "savings" + ], + "type": "column" + } + ] + ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "completed_action", + "timeColumn": "recommendation_time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "title": "VM Resize Action Impact on VCPU", + "type": "stat" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "description": "Net impact on vMem resources from pending VM Resize Actions in the selected scope.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "semi-dark-yellow", + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 0 + } + ] + }, + "unit": "deckbytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 3, + "x": 9, + "y": 26 + }, + "id": 24, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "sum" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "editorMode": "code", + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\r\n (a.attrs->'resizeInfo'->'VMEM'->>'to')::float - (a.attrs->'resizeInfo'->'VMEM'->>'from')::float as \"Difference\"\r\nFROM pending_action a\r\nwhere\r\n a.target_entity_id IN (${VM_LIST}) AND\r\n a.\"type\" = 'RESIZE' AND\r\n a.description like '%VMem%'", + "refId": "A", + "select": [ + [ + { + "params": [ + "savings" + ], + "type": "column" + } + ] + ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "completed_action", + "timeColumn": "recommendation_time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "title": "VM Resize Action Impact on VMem", + "type": "stat" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "description": "List of all applications in the selected scope sorted by the ones with the most carbon emissions over the selected period at the top. Carbon emissions associated with application groups are of the VMs that are part of each application group. ", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": true, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "purple", + "value": null + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "CO2e (t)" + }, + "properties": [ + { + "id": "unit", + "value": "masst" + }, + { + "id": "custom.cellOptions", + "value": { + "mode": "gradient", + "type": "gauge" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Grouping Type" + }, + "properties": [ + { + "id": "custom.width", + "value": 130 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Application Name" + }, + "properties": [ + { + "id": "custom.width", + "value": 274 + } + ] + } + ] + }, + "gridPos": { + "h": 23, + "w": 12, + "x": 12, + "y": 26 + }, + "id": 34, + "options": { + "footer": { + "countRows": false, + "enablePagination": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": true + }, + "frameIndex": 1, + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "CO2e (t)" + } + ] + }, + "pluginVersion": "9.4.7", + "targets": [ + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "editorMode": "code", + "format": "table", + "group": [], + "hide": false, + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n concat(eapp.name, ' (', eapp.oid,')') as \"Application Name\",\n eapp.oid as \"Application OID\",\n s.scoped_oid as \"VM OID\",\n eapp.type as \"Grouping Type\"\nFROM scope s\njoin entity eapp on eapp.oid = s.seed_oid AND s.seed_oid IN (${APPLICATION})\nwhere\n s.scoped_type = 'VIRTUAL_MACHINE'\n AND s.finish > now()\n AND eapp.last_seen > now()\n AND ((eapp.type = 'GROUP' AND eapp.attrs->'member_types' ? 'VIRTUAL_MACHINE' AND '${INCLUDE_GROUPS}') OR (eapp.type = 'BUSINESS_APPLICATION'))\n AND s.scoped_oid IN (${VM_LIST})\nORDER BY 1", + "refId": "Groups", + "select": [ + [ + { + "params": [ + "savings" + ], + "type": "column" + } + ] + ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "completed_action", + "timeColumn": "recommendation_time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "editorMode": "code", + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n --mvm.time as \"Time\",\n mvm.entity_oid as \"VM OID\",\n sum(mvm.current)/1000/1000 as \"CO2e (t)\"\nFROM metric mvm\nwhere \n $__timeFilter(mvm.time) AND\n mvm.entity_oid IN (${VM_LIST}) AND\n mvm.entity_type = 'VIRTUAL_MACHINE' AND\n mvm.type = 'CARBON'\nGROUP BY \"VM OID\"\nORDER BY 1", + "refId": "VM metrics", + "select": [ + [ + { + "params": [ + "savings" + ], + "type": "column" + } + ] + ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "completed_action", + "timeColumn": "recommendation_time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "title": "Top Applications by CO2e emissions", + "transformations": [ + { + "id": "merge", + "options": {} + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Application OID": true, + "VM OID": true + }, + "indexByName": {}, + "renameByName": {} + } + }, + { + "id": "groupBy", + "options": { + "fields": { + "Application Name": { + "aggregations": [], + "operation": "groupby" + }, + "Application OID": { + "aggregations": [], + "operation": "groupby" + }, + "CO2e (t)": { + "aggregations": [ + "sum" + ], + "operation": "aggregate" + }, + "Carbon Footprint (kg of CO2)": { + "aggregations": [ + "sum" + ], + "operation": "aggregate" + }, + "Grouping Type": { + "aggregations": [], + "operation": "groupby" + } + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Application OID": false + }, + "indexByName": {}, + "renameByName": { + "CO2e (t) (sum)": "CO2e (t)", + "Carbon Footprint (kg of CO2) (sum)": "Carbon Footprint (kg of CO2)" + } + } + }, + { + "id": "sortBy", + "options": { + "fields": {}, + "sort": [ + { + "desc": true, + "field": "CO2e (t)" + } + ] + } + }, + { + "id": "filterByValue", + "options": { + "filters": [ + { + "config": { + "id": "isNull", + "options": {} + }, + "fieldName": "Application Name" + } + ], + "match": "any", + "type": "exclude" + } + } + ], + "type": "table" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "description": "This graph shows the energy consumption in Watt-hour for VMs in the selected scope and over the selected time. ", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "orange", + "mode": "fixed" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 6, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "watth" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 31 + }, + "id": 11, + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean", + "sum" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "editorMode": "code", + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n m.\"time\" as \"time\",\n sum(m.current)\nFROM metric m\nWHERE\n $__timeFilter(m.\"time\") AND\n m.entity_oid IN (${VM_LIST}) AND\n m.type = 'ENERGY'\nGROUP BY m.time\nORDER BY 1", + "refId": "Carbon Footprint", + "select": [ + [ + { + "params": [ + "savings" + ], + "type": "column" + } + ] + ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "completed_action", + "timeColumn": "recommendation_time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "title": "Energy Consumption (Wh) ", + "type": "timeseries" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "description": "This graph shows the carbon footprint in kg of CO2e emissions for VMs in the selected scope and over the selected time. ", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "purple", + "mode": "fixed" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 6, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "masst" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 40 + }, + "id": 2, + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean", + "sum" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "editorMode": "code", + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n m.\"time\" as \"time\",\n --sum(m.current)*${PRIVATE_CLOUD_AVG_PUE}*${PRIVATE_CLOUD_EMISSIONS_FACTOR}/1000 as \"CO2e (t)\"\n sum(m.current)/1000/1000 as \"CO2e (t)\"\nFROM metric m\n--JOIN entity e on m.entity_oid = e.\"oid\" AND e.environment = 'ON_PREM' AND e.type = 'VIRTUAL_MACHINE' and m.entity_type = e.type\nWHERE\n $__timeFilter(m.\"time\") AND\n m.entity_oid IN (${VM_LIST}) AND\n m.type = 'CARBON'\nGROUP BY m.time\nORDER BY 1", + "refId": "Carbon Footprint", + "select": [ + [ + { + "params": [ + "savings" + ], + "type": "column" + } + ] + ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "completed_action", + "timeColumn": "recommendation_time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "title": "Carbon Footprint CO2e (t)", + "type": "timeseries" + } + ], + "refresh": "", + "revision": 1, + "schemaVersion": 38, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": {}, + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "definition": "select\n CONCAT(name, ' - ', oid) AS __text,\n oid AS __value\nfrom entity\nwhere\n type = 'DATACENTER'\n --and attrs->>'targets' like '%vCenter%'\n and last_seen > now()\norder by 1", + "hide": 0, + "includeAll": true, + "label": "Data Center", + "multi": true, + "name": "DATACENTER", + "options": [], + "query": "select\n CONCAT(name, ' - ', oid) AS __text,\n oid AS __value\nfrom entity\nwhere\n type = 'DATACENTER'\n --and attrs->>'targets' like '%vCenter%'\n and last_seen > now()\norder by 1", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": { + "selected": true, + "text": "Yes", + "value": "Yes" + }, + "hide": 0, + "includeAll": false, + "label": "Include Groups", + "multi": false, + "name": "INCLUDE_GROUPS", + "options": [ + { + "selected": true, + "text": "Yes", + "value": "Yes" + }, + { + "selected": false, + "text": "No", + "value": "No" + } + ], + "query": "Yes, No", + "queryValue": "", + "skipUrlSync": false, + "type": "custom" + }, + { + "current": {}, + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "definition": "select\n CONCAT(e.name, ' - ', e.type, ' (', e.oid, ')') AS __text,\n e.oid AS __value\nfrom entity e\njoin scope s on e.oid = s.scoped_oid and s.seed_oid IN (${DATACENTER})\nwhere\n ((e.type = 'GROUP' AND e.attrs->'member_types' ? 'VIRTUAL_MACHINE' AND '${INCLUDE_GROUPS}')\n OR (e.type = 'BUSINESS_APPLICATION'))\n and last_seen > now()\norder by 1", + "description": "This represents all Virtual Machine groups created in Turbonomic, including VMs that are part of a Business Application or default/user created groups in Turbonomic. ", + "hide": 0, + "includeAll": true, + "label": "Application(s)", + "multi": true, + "name": "APPLICATION", + "options": [], + "query": "select\n CONCAT(e.name, ' - ', e.type, ' (', e.oid, ')') AS __text,\n e.oid AS __value\nfrom entity e\njoin scope s on e.oid = s.scoped_oid and s.seed_oid IN (${DATACENTER})\nwhere\n ((e.type = 'GROUP' AND e.attrs->'member_types' ? 'VIRTUAL_MACHINE' AND '${INCLUDE_GROUPS}')\n OR (e.type = 'BUSINESS_APPLICATION'))\n and last_seen > now()\norder by 1", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": {}, + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "definition": "SELECT\n distinct e.oid\nFROM entity e\nWHERE\n (e.first_seen, e.last_seen) OVERLAPS ($__timeFrom(), $__timeTo()) AND\n e.type = 'VIRTUAL_MACHINE' AND\n e.environment = 'ON_PREM'", + "hide": 2, + "includeAll": true, + "label": "", + "multi": true, + "name": "VM_ENERGY_LIST", + "options": [], + "query": "SELECT\n distinct e.oid\nFROM entity e\nWHERE\n (e.first_seen, e.last_seen) OVERLAPS ($__timeFrom(), $__timeTo()) AND\n e.type = 'VIRTUAL_MACHINE' AND\n e.environment = 'ON_PREM'", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": {}, + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "definition": "SELECT\n concat(e.name, ' (', e.oid, ')') AS __text,\n e.oid AS __value\nFROM entity e\njoin scope s on e.oid = s.scoped_oid and s.scoped_type = 'VIRTUAL_MACHINE' AND s.seed_oid IN (${APPLICATION})\nWHERE\n (e.first_seen, e.last_seen) OVERLAPS ($__timeFrom(), $__timeTo()) AND\n e.type = 'VIRTUAL_MACHINE' AND\n e.oid IN (${VM_ENERGY_LIST})\nORDER BY e.name", + "hide": 0, + "includeAll": true, + "label": "Virtual Machine(s)", + "multi": true, + "name": "VM_LIST", + "options": [], + "query": "SELECT\n concat(e.name, ' (', e.oid, ')') AS __text,\n e.oid AS __value\nFROM entity e\njoin scope s on e.oid = s.scoped_oid and s.scoped_type = 'VIRTUAL_MACHINE' AND s.seed_oid IN (${APPLICATION})\nWHERE\n (e.first_seen, e.last_seen) OVERLAPS ($__timeFrom(), $__timeTo()) AND\n e.type = 'VIRTUAL_MACHINE' AND\n e.oid IN (${VM_ENERGY_LIST})\nORDER BY e.name", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + } + ] + }, + "time": { + "from": "now-30d", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Application Carbon Footprint - Private Cloud - v3.6", + "uid": "AkVTKXQVz", + "version": 2, + "weekStart": "" +} \ No newline at end of file diff --git a/embedded-visualization/Infrastructure/Sustainability/Sustainable IT Dashboard - Private Cloud - v5.2.json b/embedded-visualization/Infrastructure/Sustainability/Sustainable IT Dashboard - Private Cloud - v5.2.json new file mode 100644 index 0000000..1a5a6ff --- /dev/null +++ b/embedded-visualization/Infrastructure/Sustainability/Sustainable IT Dashboard - Private Cloud - v5.2.json @@ -0,0 +1,2859 @@ +{ + "__inputs": [ + { + "name": "DS_TURBO_TIMESCALE", + "label": "Turbo Timescale", + "description": "", + "type": "datasource", + "pluginId": "postgres", + "pluginName": "PostgreSQL" + }, + { + "name": "VAR_TREE_SEQUESTRATION_FACTOR", + "type": "constant", + "label": "TREE_SEQUESTRATION_FACTOR", + "value": "0.060", + "description": "" + }, + { + "name": "VAR_ACRES_OF_FOREST_SEQUESTRATION_FACTOR", + "type": "constant", + "label": "ACRES_OF_FOREST_SEQUESTRATION_FACTOR", + "value": "0.84", + "description": "" + }, + { + "name": "VAR_VEHICLE_EMISSIONS_FACTOR", + "type": "constant", + "label": "VEHICLE_EMISSIONS_FACTOR", + "value": "4.60", + "description": "" + }, + { + "name": "VAR_HOUSEHOLD_EMISSIONS_FACTOR", + "type": "constant", + "label": "HOUSEHOLD_EMISSIONS_FACTOR", + "value": "5.505", + "description": "" + } + ], + "__elements": {}, + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "9.5.2" + }, + { + "type": "datasource", + "id": "postgres", + "name": "PostgreSQL", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "stat", + "name": "Stat", + "version": "" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + }, + { + "type": "panel", + "id": "text", + "name": "Text", + "version": "" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "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": "Sustainable IT Dashboard - Private Cloud including suspend actions", + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 1, + "id": null, + "links": [ + { + "asDropdown": false, + "icon": "info", + "includeVars": false, + "keepTime": false, + "tags": [], + "targetBlank": true, + "title": "All Published SPECpower_ssj2008 Results", + "tooltip": "", + "type": "link", + "url": "https://www.spec.org/power_ssj2008/results/power_ssj2008.html" + } + ], + "liveNow": false, + "panels": [ + { + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 70, + "panels": [ + { + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "description": "", + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 9 + }, + "id": 72, + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": "# Sustainable IT Dashboard - Private Cloud\n***\n## Summary\nThis dashboard shows the impact of IBM Turbonomic application resource manager on Energy consumption and Carbon Dioxide equivalents (CO2e) emissions in your private cloud data center environment. \n\nThis dashboard focuses on data collected for physical machines (hosts) through a vCenter API and includes energy consumption data, number of hosts and VMs, VM-to-Host density ratios as well as the number and the type of generated host suspend and provision actions.\n***\n\n## Data and Methodology\n\n**Energy (Wh)** - data is collected from vCenter API and summed over a period of 10 minutes to get a single number for total Energy (Wh) in 10 minutes. \n\n**CO2e emissions (t)** - carbon emissions calculations are made following an open source methodology outlined in Cloud Carbon Footprint website - [www.cloudcarbonfootprint.org](https://www.cloudcarbonfootprint.org/). \nSpecifically, in this dashboard carbon emissions are calculated using the following formula:\n\n Operational Emissions = CO2e (t) = (energy consumption [Wh]) x ((private cloud average PUE) / 1000) x (private cloud emissions factor) x ((100 - percent renewable energy) / 100)\n\nWhere:\n\n- ***Private Cloud Power Usage Effectiveness (PUE)*** = An average PUE of 1.67 is used in our calculations. This [451 report](https://d39w7f4ix9f5s9.cloudfront.net/e3/79/42bf75c94c279c67d777f002051f/carbon-reduction-opportunity-of-moving-to-aws.pdf) notes: \"Adding it all up, the power usage effectiveness (PUE, the ratio of total datacenter power and the IT power) ranged from 1.63 to 1.70 in the survey sample and was consistent across company sizes. This is in line with broader industry data collected by the Uptime Institute but well below the efficiency of AWS operations.\" - 451 Research Report. We use the average of 1.63 and 1.70, which is 1.67.\n\n- ***Private Cloud Emissions Factor*** = `1,562.4 lbs CO2/MWh × (4.536 × 10^(-4) metric tons/lb) × 0.001 MWh/kWh = 7.09 × 10^(-4) metric tons CO2/kWh`. We are using `0.000709` (rounded) in our calculations. ***Note:*** Emission equivalents vary slightly vs. EPA calculation because we are using the rounded numbers of the emissions factor (7.09x10^(-4)).\n\n- ***Percent Renewable Energy*** = User can input the percent renewable energy that is used to generate the energy that is used by the datacenter in which physical hosts that are shown in this dashboard reside. CO2e emissions calculations will be adjusted by this input. \n\n**Density** - this chart shows the number of active VMs per host in your on-prem environment, and tracks the data over the selected dashboard time. \n\n**Estimated carbon sequestration equivalents** - real world examples of sequestration efforts to remove the total CO2e emissions reported in the *\"CO2e Emissions (t) - All Hosts\"* chart. ***Note:*** All sequestration equivalents and carbon emissions equivalents are adjusted for percent renewable energy inserted at the top of the dashboard. \nSequestration formulas are as follow:\n\n- ***Equivalent Carbon Sequestered by Acres of Forest in 1 year (metric tons CO2 / acre)*** = Total Emissions (metric tons CO2) * Acres of Forest Sequestration Factor. \nWhere: \nAcres of Forest Sequestration Factor = -0.23 metric ton C/acre/year* × (44 units CO2/12 units C) = -0.84 metric ton CO2/acre/year sequestered annually by one acre of average U.S. forest.\n\n- ***Equivalent Carbon Sequestered by Tree Seedlings Grown for 10 years (metric ton CO2 / tree)*** = Total Emissions (metric tons CO2) * Tree Sequestration Factor. \nWhere: \nTree Sequestration Factor = (-36.4 lbs C/tree × (44 units CO2/12 units C) × 1 metric ton/2,204.6 lbs) = -0.060 metric ton CO2 per urban tree planted.\n\n**Carbon Emissions Equivalents** - To calculate the carbon emission equivalencies we use the formulas provided by United States EPA Greenhouse Gas Equivalencies Calculator [here](https://www.epa.gov/energy/greenhouse-gases-equivalencies-calculator-calculations-and-references). Please note that there will be slight variation between the results you see in the dashboard and what is calculated by the EPA’s site because we are using the numbers they have published, which they have rounded.\n- ***Equivalent Passenger Vehicles*** = Total Emissions (metric tons CO2) * Passenger Vehicles Factor (metric tons CO2e/vehicles/year). \nWhere: \nPassenger Vehicles Factor (vehicles/year) = 8.89 × (10^-3) metric tons CO2/gallon gasoline × 11,556 VMT car/truck average × 1/22.5 miles per gallon car/truck average × 1 CO2, CH4, and N2O/0.993 CO2 = 4.60 metric tons CO2e/vehicle/year.\n\n- ***Equivalent Home Electricity Use*** - Total Emissions (metric tons CO2) * Home Electricity Use Factor. \nWhere: \nHome Electricity Use Facto r= 11,880 kWh per home × 947.2 lbs CO2 per megawatt-hour generated × 1/(1-0.073) MWh delivered/MWh generated × 1 MWh/1,000 kWh × 1 metric ton/2,204.6 lb = 5.505 metric tons CO2/home.\n", + "mode": "markdown" + }, + "pluginVersion": "9.5.2", + "title": "Readme", + "type": "text" + } + ], + "title": "Help", + "type": "row" + }, + { + "collapsed": false, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 1 + }, + "id": 2, + "panels": [], + "title": "Private Cloud - Overview", + "type": "row" + }, + { + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, + "description": "Estimated average energy savings from all Turbonomic suspend actions. \nEstimated energy savings are calculated based on the average energy over the selected time period for each one of the hosts that have a suspend action attached to them ", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "green", + "mode": "fixed" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "watth" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "CO2e Avg (t)" + }, + "properties": [ + { + "id": "unit", + "value": "masst" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Estimated Yearly CO2e Avg (t)" + }, + "properties": [ + { + "id": "unit", + "value": "masst" + } + ] + } + ] + }, + "gridPos": { + "h": 9, + "w": 5, + "x": 0, + "y": 2 + }, + "id": 54, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "sum" + ], + "fields": "", + "values": false + }, + "text": {}, + "textMode": "value_and_name" + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, + "panelId": 53, + "refId": "A" + } + ], + "title": "Physical Host Suspend Actions - Estimated Missed Energy and CO2e Savings", + "transformations": [ + { + "id": "seriesToColumns", + "options": { + "byField": "Host OID" + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "CO2e (t)": false, + "Host Name": false, + "Host OID": true, + "MTCO2e": true + }, + "indexByName": {}, + "renameByName": {} + } + }, + { + "id": "filterByValue", + "options": { + "filters": [ + { + "config": { + "id": "isNull", + "options": {} + }, + "fieldName": "Host Name" + } + ], + "match": "all", + "type": "exclude" + } + } + ], + "type": "stat" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "description": "List of all Host Suspend actions in the selected scope. \nAverage Energy = average energy consumption of the host over the selected period of the report (for example over last 3 hours)\nEstimated Yearly Average = the average energy multiplied by the number of hours in a year to get the average annual energy in W-h. ", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Energy Average (Wh)" + }, + "properties": [ + { + "id": "custom.width" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Description" + }, + "properties": [ + { + "id": "custom.width" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Host Name" + }, + "properties": [ + { + "id": "custom.width" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Date Recommended" + }, + "properties": [ + { + "id": "custom.width" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Cluster Name" + }, + "properties": [ + { + "id": "custom.width" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Energy Avg (Wh)" + }, + "properties": [ + { + "id": "custom.width" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Estimated Yearly Energy Avg (Wh)" + }, + "properties": [ + { + "id": "custom.width" + } + ] + } + ] + }, + "gridPos": { + "h": 9, + "w": 19, + "x": 5, + "y": 2 + }, + "id": 53, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "frameIndex": 1, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "editorMode": "code", + "format": "table", + "group": [], + "hide": false, + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n TO_CHAR(a.recommendation_time, 'dd/mm/yyyy hh:mm:ss') as \"Date Recommended\",\n e.\"name\" as \"Host Name\",\n e.\"oid\" as \"Host OID\",\n ec.\"name\" as \"Cluster Name\",\n a.description as \"Description\"\nFROM pending_action a\nJOIN entity e on e.oid = a.target_entity_id\njoin scope s on s.scoped_oid = e.oid and s.finish > now()\njoin entity ec on ec.oid = s.seed_oid\nwhere\n-- $__timeFilter(a.recommendation_time) AND\n a.\"type\" = 'DEACTIVATE' AND\n a.target_entity_id IN (${HOST_LIST})\nORDER BY \"Host Name\"", + "refId": "List of actions", + "select": [ + [ + { + "params": [ + "savings" + ], + "type": "column" + } + ] + ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "completed_action", + "timeColumn": "recommendation_time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "editorMode": "code", + "format": "table", + "group": [], + "hide": false, + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n e.oid as \"Host OID\",\n avg(m.current) as \"Energy Avg (Wh)\",\n (avg(m.current)*365*24) as \"Estimated Yearly Energy Avg (Wh)\"\nFROM metric m\nJOIN entity e on m.entity_oid = e.\"oid\"\nJOIN pending_action pa on pa.target_entity_id = e.oid\nWHERE\n-- $__timeFilter(m.\"time\") AND\n m.entity_type = 'PHYSICAL_MACHINE' AND\n e.environment = 'ON_PREM' AND\n m.entity_oid IN (${HOST_LIST}) AND\n m.provider_oid is null AND\n m.type = 'ENERGY'\nGROUP BY e.oid\nORDER BY 1", + "refId": "ENERGY", + "select": [ + [ + { + "params": [ + "savings" + ], + "type": "column" + } + ] + ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "completed_action", + "timeColumn": "recommendation_time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT\n e.oid as \"Host OID\",\n avg(m.current)/1000/1000 as \"CO2e Avg (t)\",\n (avg(m.current)/1000/1000*365*24) as \"Estimated Yearly CO2e Avg (t)\"\nFROM metric m\nJOIN entity e on m.entity_oid = e.\"oid\"\nJOIN pending_action pa on pa.target_entity_id = e.oid\nWHERE\n-- $__timeFilter(m.\"time\") AND\n m.entity_type = 'PHYSICAL_MACHINE' AND\n e.environment = 'ON_PREM' AND\n m.entity_oid IN (${HOST_LIST}) AND\n m.provider_oid is null AND\n m.type = 'CARBON'\nGROUP BY e.oid\nORDER BY 1", + "refId": "CARBON", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Physical Host Suspend Actions", + "transformations": [ + { + "id": "seriesToColumns", + "options": { + "byField": "Host OID", + "mode": "outer" + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Energy Average": true, + "Energy Average (kWh)": false, + "Estimated Yearly Average Energy": true, + "Estimated Yearly Average Energy (kWh)": false, + "Estimated Yearly Average Energy (kwH": true, + "Estimated Yearly Average Power": true, + "Host OID": true, + "Power Average": false + }, + "indexByName": {}, + "renameByName": {} + } + }, + { + "id": "filterByValue", + "options": { + "filters": [ + { + "config": { + "id": "isNull", + "options": {} + }, + "fieldName": "Host Name" + } + ], + "match": "all", + "type": "exclude" + } + } + ], + "type": "table" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "description": "Total energy consumption in Watt-Hour of all hosts in the selected scope and during the selected time of the dashboard. ", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 2, + "pointSize": 6, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "watth" + }, + "overrides": [ + { + "__systemRef": "hideSeriesFrom", + "matcher": { + "id": "byNames", + "options": { + "mode": "exclude", + "names": [ + "value" + ], + "prefix": "All except:", + "readOnly": true + } + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": false, + "tooltip": false, + "viz": true + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "value" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "orange", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 11, + "w": 12, + "x": 0, + "y": 11 + }, + "id": 49, + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean", + "sum" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "editorMode": "code", + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n m.\"time\" as \"time\",\n SUM(m.current) as value\nFROM metric m\nJOIN entity e on m.entity_oid = e.\"oid\" AND e.environment = 'ON_PREM' and e.type = 'PHYSICAL_MACHINE'\nWHERE\n $__timeFilter(m.\"time\") AND\n m.entity_oid IN (${HOST_LIST}) AND\n m.provider_oid is null AND\n m.type = 'ENERGY'\nGROUP BY m.time\nORDER BY 1", + "refId": "A", + "select": [ + [ + { + "params": [ + "savings" + ], + "type": "column" + } + ] + ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "completed_action", + "timeColumn": "recommendation_time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "title": "Energy Consumption (Wh) - All Hosts", + "transformations": [ + { + "id": "reduce", + "options": { + "includeTimeField": false, + "mode": "seriesToRows", + "reducers": [] + } + } + ], + "type": "timeseries" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "description": "CO2e emissions graph shows the CO2e emissions in metric tons (1 metric ton = 1,000Kg) for the hosts in the selected scope and over the selected period of the dashboard. \nCO2e emissions are calculated using Cloud Carbon Footprint open source methodology. See the Help section for more details. ", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "purple", + "mode": "fixed" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 2, + "pointSize": 6, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "masskg" + }, + "overrides": [] + }, + "gridPos": { + "h": 11, + "w": 12, + "x": 12, + "y": 11 + }, + "id": 87, + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean", + "sum" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.5.12", + "targets": [ + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "editorMode": "code", + "format": "time_series", + "group": [], + "hide": false, + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n m.\"time\" as \"time\",\n sum(m.current)/1000 as \"CO2e (kg)\"\nFROM metric m\nJOIN entity e on m.entity_oid = e.\"oid\" AND e.environment = 'ON_PREM' and e.type = 'PHYSICAL_MACHINE'\nWHERE\n $__timeFilter(m.\"time\") AND\n m.entity_oid IN (${HOST_LIST}) AND\n m.provider_oid is null AND\n m.type = 'CARBON'\nGROUP BY m.time\nORDER BY 1", + "refId": "A", + "select": [ + [ + { + "params": [ + "savings" + ], + "type": "column" + } + ] + ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "completed_action", + "timeColumn": "recommendation_time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "title": "CO2e Emissions (kg) - All Hosts", + "transformations": [], + "type": "timeseries" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "description": "This chart shows the number of active hosts in your on-prem environment, and tracks the data over the selected period. ", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "light-blue", + "mode": "fixed" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 6, + "x": 0, + "y": 22 + }, + "id": 84, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "/^Number of Active Physical Host\\(s\\)$/", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "editorMode": "code", + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n \"time\" as time,\n CAST(attrs->>'PHYSICAL_MACHINE_ACTIVE_COUNT' as integer) as \"Number of Active Physical Host(s)\"\nFROM topology_stats\nWHERE\n $__timeFilter(time)\nORDER BY 1", + "refId": "Host List", + "select": [ + [ + { + "params": [ + "savings" + ], + "type": "column" + } + ] + ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "completed_action", + "timeColumn": "recommendation_time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "title": "Number of Active Physical Host(s)", + "transformations": [], + "type": "stat" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "description": "This graph shows the ration of number of active VMs per active host over the selected period of the dashboard. \nActive VMs - powered on and discovered by Turbonomic.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "dark-blue", + "mode": "fixed" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 2, + "pointSize": 6, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 9, + "x": 6, + "y": 22 + }, + "id": 86, + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "editorMode": "code", + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n \"time\" as time,\n CAST(attrs->>'PHYSICAL_MACHINE_ACTIVE_COUNT' as integer) as \"Number of Active Hosts\"\nFROM topology_stats\nWHERE\n $__timeFilter(time)\nORDER BY 1", + "refId": "Active Hosts", + "select": [ + [ + { + "params": [ + "savings" + ], + "type": "column" + } + ] + ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "completed_action", + "timeColumn": "recommendation_time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "editorMode": "code", + "format": "time_series", + "group": [], + "hide": false, + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n \"time\" as time,\n CAST(attrs->>'VIRTUAL_MACHINE_COUNT' as integer) as \"Number of Active VMs\"\nFROM topology_stats\nWHERE\n $__timeFilter(time)\nORDER BY 1", + "refId": "Active VMs", + "select": [ + [ + { + "params": [ + "savings" + ], + "type": "column" + } + ] + ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "completed_action", + "timeColumn": "recommendation_time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "title": "VM:Host Density", + "transformations": [ + { + "id": "calculateField", + "options": { + "alias": "Density", + "binary": { + "left": "Number of Active VMs", + "operator": "/", + "reducer": "sum", + "right": "Number of Active Hosts" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + } + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Density": false, + "Number of Active Hosts": true, + "Number of Active VMs": true + }, + "indexByName": {}, + "renameByName": {} + } + } + ], + "type": "timeseries" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "description": "Estimated average energy per active VMs in the selected scope.\nActive - powered on and discovered by Turbonomic.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "orange", + "mode": "fixed" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 6, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "watth" + }, + "overrides": [] + }, + "gridPos": { + "h": 10, + "w": 9, + "x": 15, + "y": 22 + }, + "id": 68, + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.5.12", + "targets": [ + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "editorMode": "code", + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n m.\"time\" as \"time\",\n SUM(m.current) as \"Total Hosts Energy\"\nFROM metric m\nJOIN entity e on m.entity_oid = e.\"oid\" AND e.environment = 'ON_PREM' and e.type = 'PHYSICAL_MACHINE'\nWHERE\n $__timeFilter(m.\"time\") AND\n m.entity_oid IN (${HOST_LIST}) AND\n m.provider_oid is null AND\n m.type = 'ENERGY'\nGROUP BY m.time\nORDER BY 1", + "refId": "Total Hosts Energy", + "select": [ + [ + { + "params": [ + "savings" + ], + "type": "column" + } + ] + ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "completed_action", + "timeColumn": "recommendation_time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "editorMode": "code", + "format": "time_series", + "group": [], + "hide": false, + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n \"time\" as time,\n CAST(attrs->>'VIRTUAL_MACHINE_ACTIVE_COUNT' as integer) as \"Number of Active VMs\"\nFROM topology_stats\nWHERE\n $__timeFilter(time)\nORDER BY 1", + "refId": "Active VMs", + "select": [ + [ + { + "params": [ + "savings" + ], + "type": "column" + } + ] + ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "completed_action", + "timeColumn": "recommendation_time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "title": "Average Energy per VM (Wh)", + "transformations": [ + { + "id": "calculateField", + "options": { + "alias": "Average Energy per VM", + "binary": { + "left": "Total Hosts Energy", + "operator": "/", + "reducer": "sum", + "right": "Number of Active VMs" + }, + "mode": "binary", + "reduce": { + "reducer": "sum" + }, + "replaceFields": false + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Average Energy per VM": false, + "Number of Active VMs": true, + "Total Hosts Energy": true, + "Total Hosts Power": true + }, + "indexByName": {}, + "renameByName": {} + } + } + ], + "type": "timeseries" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "description": "This chart shows the number of active VMs in your on-prem environment, and tracks the data over the selected period. \nActive VMs - powered on and discovered by Turbonomic.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "light-purple", + "mode": "fixed" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 6, + "x": 0, + "y": 27 + }, + "id": 65, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "/^Number of Active VMs$/", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n \"time\" as time,\n CAST(attrs->>'VIRTUAL_MACHINE_ACTIVE_COUNT' as integer) as \"Number of Active VMs\"\nFROM topology_stats\nWHERE\n $__timeFilter(time)\nORDER BY 1", + "refId": "A", + "select": [ + [ + { + "params": [ + "savings" + ], + "type": "column" + } + ] + ], + "table": "completed_action", + "timeColumn": "recommendation_time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "title": "Number of Active VM(s)", + "type": "stat" + }, + { + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "description": "", + "gridPos": { + "h": 6, + "w": 4, + "x": 0, + "y": 32 + }, + "id": 19, + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": "
", + "mode": "html" + }, + "pluginVersion": "9.5.2", + "type": "text" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "description": "How many acres of forest per year will it take to sequester the total CO2e emissions released by physical machines in the selected scope and over the selected time. ", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "green", + "mode": "fixed" + }, + "decimals": 0, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "acres of forest" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 8, + "x": 4, + "y": 32 + }, + "id": 17, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "sum" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "editorMode": "code", + "format": "time_series", + "group": [], + "hide": false, + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n m.\"time\" as \"time\",\n sum(m.current)/1000/1000/${ACRES_OF_FOREST_SEQUESTRATION_FACTOR} as value\nFROM metric m\nJOIN entity e on m.entity_oid = e.\"oid\" \nWHERE\n $__timeFilter(m.\"time\") AND\n m.entity_type = 'PHYSICAL_MACHINE' AND\n e.environment = 'ON_PREM' AND\n m.entity_oid IN (${HOST_LIST}) AND\n m.type = 'CARBON'\nGROUP BY time\nORDER BY 1", + "refId": "A", + "select": [ + [ + { + "params": [ + "savings" + ], + "type": "column" + } + ] + ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "completed_action", + "timeColumn": "recommendation_time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "title": "Total CO2e emissions - Equivalent in acres of forest/year", + "transformations": [], + "type": "stat" + }, + { + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "description": "", + "gridPos": { + "h": 6, + "w": 4, + "x": 12, + "y": 32 + }, + "id": 22, + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": "", + "mode": "html" + }, + "pluginVersion": "9.5.2", + "type": "text" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "description": "The amount of total CO2e emissions released by physical machines in the selected scope and over the selected time is equivalent to the amount of CO2e emissions released by vehicles driven for 1 year. ", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "green", + "mode": "fixed" + }, + "decimals": 0, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "vehicles driven for 1 year" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 8, + "x": 16, + "y": 32 + }, + "id": 20, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "sum" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "editorMode": "code", + "format": "time_series", + "group": [], + "hide": false, + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n m.\"time\" as \"time\",\n sum(m.current)/1000/1000/${VEHICLE_EMISSIONS_FACTOR} as value\nFROM metric m\nJOIN entity e on m.entity_oid = e.\"oid\" \nWHERE\n $__timeFilter(m.\"time\") AND\n m.entity_type = 'PHYSICAL_MACHINE' AND\n e.environment = 'ON_PREM' AND\n m.entity_oid IN (${HOST_LIST}) AND\n m.type = 'CARBON'\nGROUP BY time\nORDER BY 1", + "refId": "A", + "select": [ + [ + { + "params": [ + "savings" + ], + "type": "column" + } + ] + ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "completed_action", + "timeColumn": "recommendation_time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "title": "Total CO2e emissions - Equivalent in vehicles", + "transformations": [], + "type": "stat" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "description": "How many trees growing for 10 years will it take to sequester the total CO2e emissions released by physical machines in the selected scope and over the selected time. ", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "green", + "mode": "fixed" + }, + "decimals": 0, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "trees" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 8, + "x": 4, + "y": 35 + }, + "id": 16, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "sum" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "editorMode": "code", + "format": "time_series", + "group": [], + "hide": false, + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n m.\"time\" as \"time\",\n sum(m.current)/1000/1000/${TREE_SEQUESTRATION_FACTOR} as value\nFROM metric m\nJOIN entity e on m.entity_oid = e.\"oid\" \nWHERE\n $__timeFilter(m.\"time\") AND\n m.entity_type = 'PHYSICAL_MACHINE' AND\n e.environment = 'ON_PREM' AND\n m.entity_oid IN (${HOST_LIST}) AND\n m.type = 'CARBON'\nGROUP BY time\nORDER BY 1", + "refId": "A", + "select": [ + [ + { + "params": [ + "savings" + ], + "type": "column" + } + ] + ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "completed_action", + "timeColumn": "recommendation_time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "title": "Total CO2e emissions - Equivalent in trees growing for 10 years", + "transformations": [], + "type": "stat" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "description": "The amount of total CO2e emissions released by physical machines in the selected scope and over the selected time is equivalent to the amount of CO2e emissions released by household electricity consumption for 1 year. ", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "green", + "mode": "fixed" + }, + "decimals": 0, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "household electricity consumption for 1 year" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 8, + "x": 16, + "y": 35 + }, + "id": 21, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "sum" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "editorMode": "code", + "format": "time_series", + "group": [], + "hide": false, + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n m.\"time\" as \"time\",\n sum(m.current)/1000/1000/${HOUSEHOLD_EMISSIONS_FACTOR} as value\nFROM metric m\nJOIN entity e on m.entity_oid = e.\"oid\" \nWHERE\n $__timeFilter(m.\"time\") AND\n m.entity_type = 'PHYSICAL_MACHINE' AND\n e.environment = 'ON_PREM' AND\n m.entity_oid IN (${HOST_LIST}) AND\n m.type = 'CARBON'\nGROUP BY time\nORDER BY 1", + "refId": "A", + "select": [ + [ + { + "params": [ + "savings" + ], + "type": "column" + } + ] + ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "completed_action", + "timeColumn": "recommendation_time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "title": "Total CO2e emissions - Equivalent in household electricity consumption", + "transformations": [], + "type": "stat" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 38 + }, + "id": 74, + "panels": [], + "title": "Private Cloud - Individual Host Metrics", + "type": "row" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "stepBefore", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "watth" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 14, + "x": 0, + "y": 39 + }, + "id": 48, + "options": { + "legend": { + "calcs": [ + "min", + "max", + "mean", + "sum" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Total", + "sortDesc": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "editorMode": "code", + "format": "time_series", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n m.\"time\" as \"time\",\n m.current as value,\n e.name as metric\nFROM metric m\nJOIN entity e on m.entity_oid = e.\"oid\" \nWHERE\n $__timeFilter(m.\"time\") AND\n m.entity_type = 'PHYSICAL_MACHINE' AND\n e.environment = 'ON_PREM' AND\n m.entity_oid IN (${HOST_LIST}) AND\n m.provider_oid is null AND\n m.type = 'ENERGY'\nORDER BY 1", + "refId": "A", + "select": [ + [ + { + "params": [ + "savings" + ], + "type": "column" + } + ] + ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "completed_action", + "timeColumn": "recommendation_time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "title": "Energy Consumption (Wh) - Individual Host(s)", + "transformations": [], + "type": "timeseries" + }, + { + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "yellow", + "value": 50 + }, + { + "color": "orange", + "value": 100 + }, + { + "color": "red", + "value": 150 + } + ] + }, + "unit": "watth" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 10, + "x": 14, + "y": 39 + }, + "id": 63, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "datasource", + "uid": "-- Dashboard --" + }, + "panelId": 48, + "refId": "A" + } + ], + "title": "Average Energy Consumption (Wh) - Individual Host(s)", + "type": "stat" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "masskg" + }, + "overrides": [] + }, + "gridPos": { + "h": 11, + "w": 24, + "x": 0, + "y": 48 + }, + "id": 75, + "options": { + "legend": { + "calcs": [ + "min", + "mean", + "max", + "sum" + ], + "displayMode": "table", + "placement": "right", + "showLegend": true, + "sortBy": "Total", + "sortDesc": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.5.12", + "targets": [ + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "editorMode": "code", + "format": "time_series", + "group": [], + "hide": false, + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n m.\"time\" as \"time\",\n (m.current)/1000 as \"CO2e (kg)\",\n e.name as metric\nFROM metric m\nJOIN entity e on m.entity_oid = e.\"oid\" \nWHERE\n $__timeFilter(m.\"time\") AND\n m.entity_type = 'PHYSICAL_MACHINE' AND\n e.environment = 'ON_PREM' AND\n m.entity_oid IN (${HOST_LIST}) AND\n m.type = 'CARBON'\nORDER BY 1", + "refId": "A", + "select": [ + [ + { + "params": [ + "savings" + ], + "type": "column" + } + ] + ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "completed_action", + "timeColumn": "recommendation_time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "title": "CO2e Emissions (kg) - Individual Host(s)", + "transformations": [], + "type": "timeseries" + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": true, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Number of CPU" + }, + "properties": [ + { + "id": "custom.width", + "value": 134 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "CPU Model" + }, + "properties": [ + { + "id": "custom.width", + "value": 313 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Host Name" + }, + "properties": [ + { + "id": "custom.width", + "value": 273 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Host Model" + }, + "properties": [ + { + "id": "custom.width", + "value": 160 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Power State" + }, + "properties": [ + { + "id": "custom.width", + "value": 118 + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 59 + }, + "id": 44, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "frameIndex": 1, + "showHeader": true, + "sortBy": [ + { + "desc": false, + "displayName": "Host Name" + } + ] + }, + "pluginVersion": "9.5.2", + "targets": [ + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "editorMode": "code", + "format": "table", + "group": [], + "metricColumn": "none", + "rawQuery": true, + "rawSql": "SELECT\n e.oid as \"Host OID\",\n e.\"name\" as \"Host Name\",\n\tattrs->>'model' as \"Host Model\",\n\tinitcap(replace(attrs->>'state', '_', ' ')) as \"Power State\",\n\tattrs->>'num_cpus' as \"Number of CPU\",\n\tattrs->>'cpu_model' as \"CPU Model\"\nFROM entity e\nWHERE\n (e.first_seen, e.last_seen) overlaps ($__timeFrom(), $__timeTo()) AND\n e.\"type\" = 'PHYSICAL_MACHINE' AND\n e.environment = 'ON_PREM' AND\n e.oid IN (${HOST_LIST})\nORDER BY 1", + "refId": "Host List", + "select": [ + [ + { + "params": [ + "savings" + ], + "type": "column" + } + ] + ], + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + }, + "table": "completed_action", + "timeColumn": "recommendation_time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "format": "table", + "group": [], + "hide": false, + "metricColumn": "none", + "rawQuery": true, + "rawSql": "select\n e.oid as \"Host OID\",\n --e.name as \"Host Name\",\n count(s.seed_oid) as \"Current Number of VMs\"\nfrom entity e\njoin scope s on s.seed_oid = e.oid and s.scoped_type = 'VIRTUAL_MACHINE' and s.finish > now()\nwhere\n e.type = 'PHYSICAL_MACHINE' and\n e.oid IN (${HOST_LIST}) and\n e.last_seen > now()\ngroup by e.oid\norder by e.name", + "refId": "VMs per Host", + "select": [ + [ + { + "params": [ + "savings" + ], + "type": "column" + } + ] + ], + "table": "completed_action", + "timeColumn": "recommendation_time", + "timeColumnType": "timestamp", + "where": [ + { + "name": "$__timeFilter", + "params": [], + "type": "macro" + } + ] + } + ], + "title": "Physical Host(s) List", + "transformations": [ + { + "id": "seriesToColumns", + "options": { + "byField": "Host OID" + } + }, + { + "id": "organize", + "options": { + "excludeByName": { + "Host OID": true + }, + "indexByName": {}, + "renameByName": {} + } + } + ], + "type": "table" + } + ], + "refresh": "", + "revision": 1, + "schemaVersion": 38, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": {}, + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "definition": "select distinct\n CONCAT(e.name, ' - ', e.oid) AS __text,\n e.oid AS __value\nfrom entity e\nwhere\n e.type = 'DATACENTER'\n and e.last_seen > now()\norder by 1", + "hide": 0, + "includeAll": true, + "label": "Data Center", + "multi": true, + "name": "DATACENTER", + "options": [], + "query": "select distinct\n CONCAT(e.name, ' - ', e.oid) AS __text,\n e.oid AS __value\nfrom entity e\nwhere\n e.type = 'DATACENTER'\n and e.last_seen > now()\norder by 1", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": {}, + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "definition": "SELECT\n '00000000000000' AS __text,\n '00000000000000' AS __value\nUNION\nselect distinct\n CONCAT(name, ' - ', oid) AS __text,\n e.oid AS __value\nfrom \"scope\" s \njoin entity e on s.scoped_oid = e.\"oid\"\nwhere\n s.scoped_type = 'COMPUTE_CLUSTER'\n and s.seed_oid IN (${DATACENTER})\n and e.last_seen > now()\norder by 1\n", + "hide": 2, + "includeAll": true, + "label": "Cluster", + "multi": true, + "name": "CLUSTER", + "options": [], + "query": "SELECT\n '00000000000000' AS __text,\n '00000000000000' AS __value\nUNION\nselect distinct\n CONCAT(name, ' - ', oid) AS __text,\n e.oid AS __value\nfrom \"scope\" s \njoin entity e on s.scoped_oid = e.\"oid\"\nwhere\n s.scoped_type = 'COMPUTE_CLUSTER'\n and s.seed_oid IN (${DATACENTER})\n and e.last_seen > now()\norder by 1\n", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": {}, + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "definition": "select distinct\n CONCAT(name, ' - ', oid) AS __text,\n e.oid AS __value\nfrom \"scope\" s\njoin entity e on s.scoped_oid = e.\"oid\"\nwhere\n s.scoped_type = 'PHYSICAL_MACHINE'\n and s.seed_oid IN (${CLUSTER:sqlstring})\n and e.last_seen > now()\n and attrs->>'model' not like 'VMware%'\norder by 1", + "hide": 2, + "includeAll": true, + "label": "Clustered Host(s)", + "multi": true, + "name": "CLUSTERED_HOST_LIST", + "options": [], + "query": "select distinct\n CONCAT(name, ' - ', oid) AS __text,\n e.oid AS __value\nfrom \"scope\" s\njoin entity e on s.scoped_oid = e.\"oid\"\nwhere\n s.scoped_type = 'PHYSICAL_MACHINE'\n and s.seed_oid IN (${CLUSTER:sqlstring})\n and e.last_seen > now()\n and attrs->>'model' not like 'VMware%'\norder by 1", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": {}, + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "definition": "SELECT\n '00000000000000' AS __text,\n '00000000000000' AS __value\nUNION\nselect distinct\n CONCAT(name, ' - ', oid) AS __text,\n e.oid AS __value\nfrom \"scope\" s \njoin entity e on s.scoped_oid = e.\"oid\"\nwhere\n s.scoped_type = 'PHYSICAL_MACHINE'\n and s.seed_oid IN (${DATACENTER})\n and e.oid NOT IN (${CLUSTERED_HOST_LIST})\n and e.last_seen > now()\n and e.attrs->>'model' not like 'VMware%'\norder by 1", + "hide": 2, + "includeAll": true, + "label": "Standalone Host(s)", + "multi": true, + "name": "STANDALONE_HOST_LIST", + "options": [], + "query": "SELECT\n '00000000000000' AS __text,\n '00000000000000' AS __value\nUNION\nselect distinct\n CONCAT(name, ' - ', oid) AS __text,\n e.oid AS __value\nfrom \"scope\" s \njoin entity e on s.scoped_oid = e.\"oid\"\nwhere\n s.scoped_type = 'PHYSICAL_MACHINE'\n and s.seed_oid IN (${DATACENTER})\n and e.oid NOT IN (${CLUSTERED_HOST_LIST})\n and e.last_seen > now()\n and e.attrs->>'model' not like 'VMware%'\norder by 1", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": {}, + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "definition": "select distinct\n CONCAT(e.name, ' - ', e.oid) AS __text,\n e.oid AS __value\nfrom \"entity\" e\njoin scope s on e.oid = s.scoped_oid\nwhere\n (e.oid IN (${CLUSTER}) AND s.seed_oid IN (${DATACENTER}))\n OR\n e.oid IN (${STANDALONE_HOST_LIST})\norder by 1", + "hide": 0, + "includeAll": true, + "label": "Scope (Cluster and/or Standalone hosts)", + "multi": true, + "name": "SCOPE", + "options": [], + "query": "select distinct\n CONCAT(e.name, ' - ', e.oid) AS __text,\n e.oid AS __value\nfrom \"entity\" e\njoin scope s on e.oid = s.scoped_oid\nwhere\n (e.oid IN (${CLUSTER}) AND s.seed_oid IN (${DATACENTER}))\n OR\n e.oid IN (${STANDALONE_HOST_LIST})\norder by 1", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": {}, + "datasource": { + "type": "postgres", + "uid": "${DS_TURBO_TIMESCALE}" + }, + "definition": "select distinct\n CONCAT(e.name, ' - ', e.oid) AS __text,\n e.oid AS __value\nfrom entity e\nwhere\n (\n e.type = 'PHYSICAL_MACHINE' AND\n e.oid IN (${SCOPE})\n )\n OR\n (\n e.oid IN (SELECT \n s.scoped_oid\n FROM \"scope\" s\n WHERE\n s.seed_oid IN (${SCOPE}) AND\n s.scoped_type = 'PHYSICAL_MACHINE' AND\n s.finish > now())\n )\norder by 1", + "hide": 2, + "includeAll": true, + "label": "Host List", + "multi": true, + "name": "HOST_LIST", + "options": [], + "query": "select distinct\n CONCAT(e.name, ' - ', e.oid) AS __text,\n e.oid AS __value\nfrom entity e\nwhere\n (\n e.type = 'PHYSICAL_MACHINE' AND\n e.oid IN (${SCOPE})\n )\n OR\n (\n e.oid IN (SELECT \n s.scoped_oid\n FROM \"scope\" s\n WHERE\n s.seed_oid IN (${SCOPE}) AND\n s.scoped_type = 'PHYSICAL_MACHINE' AND\n s.finish > now())\n )\norder by 1", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "description": "Each Tree Seedlings Grown for 10 years captures that amount of ton of CO2", + "hide": 2, + "label": "", + "name": "TREE_SEQUESTRATION_FACTOR", + "query": "${VAR_TREE_SEQUESTRATION_FACTOR}", + "skipUrlSync": false, + "type": "constant", + "current": { + "value": "${VAR_TREE_SEQUESTRATION_FACTOR}", + "text": "${VAR_TREE_SEQUESTRATION_FACTOR}", + "selected": false + }, + "options": [ + { + "value": "${VAR_TREE_SEQUESTRATION_FACTOR}", + "text": "${VAR_TREE_SEQUESTRATION_FACTOR}", + "selected": false + } + ] + }, + { + "description": "Each acre of forest captures that amount of ton of CO2 per year", + "hide": 2, + "label": "", + "name": "ACRES_OF_FOREST_SEQUESTRATION_FACTOR", + "query": "${VAR_ACRES_OF_FOREST_SEQUESTRATION_FACTOR}", + "skipUrlSync": false, + "type": "constant", + "current": { + "value": "${VAR_ACRES_OF_FOREST_SEQUESTRATION_FACTOR}", + "text": "${VAR_ACRES_OF_FOREST_SEQUESTRATION_FACTOR}", + "selected": false + }, + "options": [ + { + "value": "${VAR_ACRES_OF_FOREST_SEQUESTRATION_FACTOR}", + "text": "${VAR_ACRES_OF_FOREST_SEQUESTRATION_FACTOR}", + "selected": false + } + ] + }, + { + "description": "Emission of ton of CO2 per passenger vehicles driven for 1 year", + "hide": 2, + "label": "", + "name": "VEHICLE_EMISSIONS_FACTOR", + "query": "${VAR_VEHICLE_EMISSIONS_FACTOR}", + "skipUrlSync": false, + "type": "constant", + "current": { + "value": "${VAR_VEHICLE_EMISSIONS_FACTOR}", + "text": "${VAR_VEHICLE_EMISSIONS_FACTOR}", + "selected": false + }, + "options": [ + { + "value": "${VAR_VEHICLE_EMISSIONS_FACTOR}", + "text": "${VAR_VEHICLE_EMISSIONS_FACTOR}", + "selected": false + } + ] + }, + { + "description": "Emission of ton of CO2 per household electricity consumption for 1 year", + "hide": 2, + "label": "", + "name": "HOUSEHOLD_EMISSIONS_FACTOR", + "query": "${VAR_HOUSEHOLD_EMISSIONS_FACTOR}", + "skipUrlSync": false, + "type": "constant", + "current": { + "value": "${VAR_HOUSEHOLD_EMISSIONS_FACTOR}", + "text": "${VAR_HOUSEHOLD_EMISSIONS_FACTOR}", + "selected": false + }, + "options": [ + { + "value": "${VAR_HOUSEHOLD_EMISSIONS_FACTOR}", + "text": "${VAR_HOUSEHOLD_EMISSIONS_FACTOR}", + "selected": false + } + ] + } + ] + }, + "time": { + "from": "now-30d", + "to": "now" + }, + "timepicker": { + "nowDelay": "" + }, + "timezone": "", + "title": "Sustainable IT Dashboard - Private Cloud - v5.2", + "uid": "e7cba2f3-ea42-4528-80a4-56cf0606fd95", + "version": 5, + "weekStart": "" +} \ No newline at end of file diff --git a/embedded-visualization/Virtual Machines/cspe-Lowly-Utilized VMs/Lowly Utilized VMs with Energy Consumption (clusters).json b/embedded-visualization/Virtual Machines/cspe-Lowly-Utilized VMs/Lowly Utilized VMs with Energy Consumption (clusters).json new file mode 100644 index 0000000..f12b95f --- /dev/null +++ b/embedded-visualization/Virtual Machines/cspe-Lowly-Utilized VMs/Lowly Utilized VMs with Energy Consumption (clusters).json @@ -0,0 +1,448 @@ +{ + "__inputs": [ + { + "name": "DS_SE1_- TIMESCALEDB", + "label": "SE1 - TimescaleDB", + "description": "", + "type": "datasource", + "pluginId": "postgres", + "pluginName": "PostgreSQL" + } + ], + "__elements": {}, + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "10.1.1" + }, + { + "type": "datasource", + "id": "postgres", + "name": "PostgreSQL", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "table", + "name": "Table", + "version": "" + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "postgres", + "uid": "${DS_SE1_- TIMESCALEDB}" + }, + "fieldConfig": { + "defaults": { + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": true, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byRegexp", + "options": ".*Utilization.*" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "mode": "lcd", + "type": "gauge" + } + }, + { + "id": "unit", + "value": "percent" + }, + { + "id": "decimals", + "value": 2 + }, + { + "id": "noValue", + "value": "-" + }, + { + "id": "max", + "value": 100 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Sum of Energy Consumption (Wh)" + }, + "properties": [ + { + "id": "custom.cellOptions", + "value": { + "mode": "lcd", + "type": "gauge" + } + }, + { + "id": "thresholds", + "value": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#6ED0E0", + "value": 100 + }, + { + "color": "#EAB839", + "value": 400 + }, + { + "color": "red", + "value": 800 + } + ] + } + }, + { + "id": "unit", + "value": "watth" + } + ] + } + ] + }, + "gridPos": { + "h": 20, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 5, + "links": [], + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true, + "sortBy": [ + { + "desc": false, + "displayName": "VM Name" + } + ] + }, + "pluginVersion": "10.1.1", + "targets": [ + { + "datasource": { + "type": "postgres", + "uid": "${DS_SE1_- TIMESCALEDB}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT\n e.name as \"VM Name\",\n e.oid as \"VM OID\",\n max(mvcpu.utilization)*100 as \"Max vCPU Utilization (%)\"\nFROM entity e\nJOIN metric mvcpu on mvcpu.entity_oid = e.oid AND $__timeFilter(mvcpu.\"time\") AND mvcpu.entity_oid IN (${VM_OID}) AND mvcpu.\"type\" = 'VCPU' AND mvcpu.utilization IS NOT NULL\nWHERE\n e.last_seen > now() AND\n e.oid IN (${VM_OID})\nGROUP BY \"VM OID\"\nHAVING max(mvcpu.utilization)*100 < ${MAXIMUM_VCPU}\n--ORDER BY 1", + "refId": "vCPU", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_SE1_- TIMESCALEDB}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT\n e.name as \"VM Name\",\n e.oid as \"VM OID\",\n max(mvmem.utilization)*100 as \"Max vMem Utilization (%)\"\nFROM entity e\nJOIN metric mvmem on mvmem.entity_oid = e.oid AND $__timeFilter(mvmem.\"time\") AND mvmem.entity_oid IN (${VM_OID}) AND mvmem.\"type\" = 'VMEM' AND mvmem.utilization IS NOT NULL\nWHERE\n e.last_seen > now() AND\n e.oid IN (${VM_OID})\nGROUP BY \"VM OID\"\nHAVING max(mvmem.utilization)*100 < ${MAXIMUM_VMEM}\n--ORDER BY 1", + "refId": "vMem", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + }, + { + "datasource": { + "type": "postgres", + "uid": "${DS_SE1_- TIMESCALEDB}" + }, + "editorMode": "code", + "format": "table", + "hide": false, + "rawQuery": true, + "rawSql": "SELECT\n e.name as \"VM Name\",\n e.oid as \"VM OID\",\n sum(menergy.utilization)*100 as \"Sum of Energy Consumption (Wh)\"\nFROM entity e\nJOIN metric menergy on menergy.entity_oid = e.oid AND $__timeFilter(menergy.\"time\") AND menergy.entity_oid IN (${VM_OID}) AND menergy.\"type\" = 'VMEM' AND menergy.utilization IS NOT NULL\nWHERE\n e.last_seen > now() AND\n e.oid IN (${VM_OID})\nGROUP BY \"VM OID\"\n-- HAVING max(mvcpu.utilization)*100 < ${MAXIMUM_VCPU} AND max(mvmem.utilization)*100 < ${MAXIMUM_VMEM}\n--ORDER BY 1", + "refId": "Energy", + "sql": { + "columns": [ + { + "parameters": [], + "type": "function" + } + ], + "groupBy": [ + { + "property": { + "type": "string" + }, + "type": "groupBy" + } + ], + "limit": 50 + } + } + ], + "title": "Lowly Utilized VMs", + "transformations": [ + { + "id": "merge", + "options": {} + }, + { + "id": "organize", + "options": { + "excludeByName": { + "VM OID": true + }, + "indexByName": {}, + "renameByName": { + "Max vCPU Utilization (%)": "" + } + } + }, + { + "id": "filterByValue", + "options": { + "filters": [ + { + "config": { + "id": "isNull", + "options": {} + }, + "fieldName": "Max vCPU Utilization (%)" + }, + { + "config": { + "id": "isNull", + "options": {} + }, + "fieldName": "Max vMem Utilization (%)" + } + ], + "match": "any", + "type": "exclude" + } + }, + { + "id": "sortBy", + "options": { + "fields": {}, + "sort": [ + { + "desc": false, + "field": "VM Name" + } + ] + } + } + ], + "type": "table" + } + ], + "refresh": "", + "revision": 1, + "schemaVersion": 38, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": {}, + "datasource": { + "type": "postgres", + "uid": "${DS_SE1_- TIMESCALEDB}" + }, + "definition": "SELECT\n CONCAT(e.name, ' - ' , e.oid) AS __text,\n e.oid AS __value\nFROM entity e\nWHERE e.type = 'COMPUTE_CLUSTER'\nAND e.last_seen > now()\norder by 1", + "hide": 0, + "includeAll": true, + "label": "Cluster Name", + "multi": true, + "name": "CLUSTER_OID", + "options": [], + "query": "SELECT\n CONCAT(e.name, ' - ' , e.oid) AS __text,\n e.oid AS __value\nFROM entity e\nWHERE e.type = 'COMPUTE_CLUSTER'\nAND e.last_seen > now()\norder by 1", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "current": {}, + "datasource": { + "type": "postgres", + "uid": "${DS_SE1_- TIMESCALEDB}" + }, + "definition": "SELECT\n e.name as __text,\n e.oid as __value\nFROM entity e\nJOIN scope s ON s.scoped_oid = e.oid AND s.seed_oid IN (${CLUSTER_OID}) AND s.finish > now()\nWHERE\n s.scoped_type = 'VIRTUAL_MACHINE' AND\n e.last_seen > now() AND\n e.attrs->>'state' = 'POWERED_ON'\nORDER BY 1", + "description": "List of VMs which are POWERED_ON only", + "hide": 2, + "includeAll": true, + "label": "", + "multi": true, + "name": "VM_OID", + "options": [], + "query": "SELECT\n e.name as __text,\n e.oid as __value\nFROM entity e\nJOIN scope s ON s.scoped_oid = e.oid AND s.seed_oid IN (${CLUSTER_OID}) AND s.finish > now()\nWHERE\n s.scoped_type = 'VIRTUAL_MACHINE' AND\n e.last_seen > now() AND\n e.attrs->>'state' = 'POWERED_ON'\nORDER BY 1", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "current": { + "selected": true, + "text": "10", + "value": "10" + }, + "hide": 0, + "label": "Maximum vCPU Usage", + "name": "MAXIMUM_VCPU", + "options": [ + { + "selected": true, + "text": "10", + "value": "10" + } + ], + "query": "10", + "skipUrlSync": false, + "type": "textbox" + }, + { + "current": { + "selected": true, + "text": "10", + "value": "10" + }, + "hide": 0, + "label": "Maximum vMem Usage", + "name": "MAXIMUM_VMEM", + "options": [ + { + "selected": true, + "text": "10", + "value": "10" + } + ], + "query": "10", + "skipUrlSync": false, + "type": "textbox" + } + ] + }, + "time": { + "from": "now-2d", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Lowly Utilized VMs with Energy Consumption (clusters)", + "uid": "b8da7c10-043f-49df-944f-8efc6bf3125f", + "version": 7, + "weekStart": "" +} \ No newline at end of file