Skip to content

Instantly share code, notes, and snippets.

@Jacketbg
Last active May 10, 2018 12:59
Show Gist options
  • Select an option

  • Save Jacketbg/7255b4f81ebb2de0e8a5708b4335c9d7 to your computer and use it in GitHub Desktop.

Select an option

Save Jacketbg/7255b4f81ebb2de0e8a5708b4335c9d7 to your computer and use it in GitHub Desktop.
Grafana dashboard for plotting server power usage from Graphite
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"id": 48,
"iteration": 1525956317040,
"links": [],
"panels": [
{
"cacheTimeout": null,
"colorBackground": false,
"colorValue": false,
"colors": [
"#299c46",
"rgba(237, 129, 40, 0.89)",
"#d44a3a"
],
"datasource": "Graphite",
"decimals": null,
"format": "short",
"gauge": {
"maxValue": 6000,
"minValue": 0,
"show": true,
"thresholdLabels": false,
"thresholdMarkers": true
},
"gridPos": {
"h": 7,
"w": 5,
"x": 0,
"y": 0
},
"hideTimeOverride": true,
"id": 4,
"interval": null,
"links": [],
"mappingType": 1,
"mappingTypes": [
{
"name": "value to text",
"value": 1
},
{
"name": "range to text",
"value": 2
}
],
"maxDataPoints": 100,
"nullPointMode": "connected",
"nullText": null,
"postfix": "",
"postfixFontSize": "50%",
"prefix": "",
"prefixFontSize": "50%",
"rangeMaps": [
{
"from": "null",
"text": "N/A",
"to": "null"
}
],
"sparkline": {
"fillColor": "rgba(31, 118, 189, 0.18)",
"full": false,
"lineColor": "rgb(31, 120, 193)",
"show": true
},
"tableColumn": "",
"targets": [
{
"$$hashKey": "object:973",
"expr": "",
"format": "time_series",
"hide": false,
"intervalFactor": 1,
"refId": "A",
"target": "sumSeries(ipmi-stats.cluster.*.power, *)",
"textEditor": false
}
],
"thresholds": "4000,5000",
"timeFrom": "5m",
"timeShift": null,
"title": "Current Power (Watt)",
"type": "singlestat",
"valueFontSize": "80%",
"valueMaps": [
{
"op": "=",
"text": "N/A",
"value": "null"
}
],
"valueName": "avg"
},
{
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "Graphite",
"fill": 5,
"gridPos": {
"h": 7,
"w": 19,
"x": 5,
"y": 0
},
"id": 2,
"legend": {
"alignAsTable": true,
"avg": false,
"current": true,
"hideEmpty": false,
"hideZero": false,
"max": false,
"min": false,
"rightSide": true,
"show": true,
"sideWidth": null,
"sort": "current",
"sortDesc": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 1,
"links": [],
"nullPointMode": "null",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": true,
"steppedLine": false,
"targets": [
{
"$$hashKey": "object:810",
"expr": "",
"format": "time_series",
"intervalFactor": 1,
"refId": "A",
"target": "aliasByNode(ipmi-stats.cluster.*.power, 2)",
"textEditor": false
}
],
"thresholds": [],
"timeFrom": null,
"timeShift": null,
"title": "Power Consumption",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"transparent": false,
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": "Watt",
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
]
},
{
"cacheTimeout": null,
"colorBackground": true,
"colorValue": false,
"colors": [
"#299c46",
"rgba(237, 129, 40, 0.89)",
"#d44a3a"
],
"datasource": "Graphite",
"decimals": 2,
"description": "",
"format": "currencyEUR",
"gauge": {
"maxValue": 6000,
"minValue": 0,
"show": false,
"thresholdLabels": false,
"thresholdMarkers": true
},
"gridPos": {
"h": 5,
"w": 5,
"x": 0,
"y": 7
},
"hideTimeOverride": true,
"id": 13,
"interval": null,
"links": [],
"mappingType": 1,
"mappingTypes": [
{
"name": "value to text",
"value": 1
},
{
"name": "range to text",
"value": 2
}
],
"maxDataPoints": 100,
"nullPointMode": "connected",
"nullText": null,
"postfix": "",
"postfixFontSize": "50%",
"prefix": "",
"prefixFontSize": "50%",
"rangeMaps": [
{
"from": "null",
"text": "N/A",
"to": "null"
}
],
"sparkline": {
"fillColor": "rgba(31, 118, 189, 0.18)",
"full": false,
"lineColor": "rgb(31, 120, 193)",
"show": false
},
"tableColumn": "",
"targets": [
{
"$$hashKey": "object:456",
"expr": "",
"format": "time_series",
"hide": false,
"intervalFactor": 1,
"refId": "A",
"target": "alias(scale(scale(summarize(summarize(sumSeries(ipmi-stats.cluster.*.power, *), '1h', 'avg', 'false'), '30d', 'sum', false), 0.001), 0.16), 'EUR')",
"textEditor": true
}
],
"thresholds": "500,1000",
"timeFrom": "1M",
"timeShift": null,
"title": "Monthly Bill (EUR)",
"type": "singlestat",
"valueFontSize": "80%",
"valueMaps": [
{
"op": "=",
"text": "N/A",
"value": "null"
}
],
"valueName": "total"
},
{
"aliasColors": {
"EUR": "#f15921"
},
"bars": true,
"dashLength": 10,
"dashes": false,
"datasource": "Graphite",
"decimals": null,
"fill": 1,
"gridPos": {
"h": 5,
"w": 19,
"x": 5,
"y": 7
},
"id": 12,
"legend": {
"alignAsTable": false,
"avg": false,
"current": false,
"max": false,
"min": false,
"show": false,
"total": false,
"values": false
},
"lines": false,
"linewidth": 1,
"links": [],
"nullPointMode": "null",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"repeat": null,
"repeatDirection": "h",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"$$hashKey": "object:879",
"expr": "",
"format": "time_series",
"interval": "",
"intervalFactor": 1,
"refId": "A",
"target": "alias(scale(scale(summarize(summarize(sumSeries(ipmi-stats.cluster.*.power, *), '1h', 'avg', false), '1d', 'sum', 'false'), 0.001), 0.16), 'EUR')",
"textEditor": false
}
],
"thresholds": [],
"timeFrom": "1M",
"timeShift": null,
"title": "Daily Power Bill (EUR)",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
]
}
],
"refresh": "1m",
"schemaVersion": 16,
"style": "dark",
"tags": [],
"templating": {
"list": [
{
"allValue": null,
"current": {
"text": "0.16",
"value": "0.16"
},
"hide": 2,
"includeAll": false,
"label": "Price per kWh",
"multi": false,
"name": "kwh_price",
"options": [
{
"selected": true,
"text": "0.16",
"value": "0.16"
}
],
"query": "0.16",
"type": "custom"
}
]
},
"time": {
"from": "now-30d",
"to": "now"
},
"timepicker": {
"refresh_intervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
],
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "",
"title": "Datacenter Power Consumption",
"uid": "hQ-u99gmz",
"version": 17
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment