Grafana dashboard: Grafana Cloud Historical Spend
Description: See your monthly spend by product, and how fast you are burning through your spend commitment

# Grafana Cloud Historical Spend Dashboard

This is for Grafana Cloud Committed-spend customers to see your monthly spend. See how quickly you are burning down through your spend-commit, and which GrafanaLabs products you are spending on.

{
  "__inputs": [],
  "__requires": [
    {
      "id": "barchart",
      "name": "Bar chart",
      "type": "panel",
      "version": ""
    },
    {
      "id": "grafana",
      "name": "Grafana",
      "type": "grafana",
      "version": "9.1.0-958e1b6apre"
    },
    {
      "id": "prometheus",
      "name": "Prometheus",
      "type": "datasource",
      "version": "1.0.0"
    },
    {
      "id": "timeseries",
      "name": "Time series",
      "type": "panel",
      "version": ""
    }
  ],
  "annotations": {
    "list": []
  },
  "editable": false,
  "gnetId": 16574,
  "graphTooltip": 0,
  "hideControls": false,
  "id": null,
  "links": [],
  "panels": [
    {
      "datasource": {
        "type": "prometheus",
        "uid": "grafanacloud-usage"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "fixedColor": "orange",
            "mode": "fixed"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "left",
            "axisSoftMin": 0,
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 2,
            "pointSize": 10,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "always",
            "spanNulls": true,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "links": [],
          "mappings": [],
          "noValue": "$0",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "rgb(150, 150, 150)",
                "value": null
              }
            ]
          },
          "unit": "currencyUSD"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 9,
        "w": 8,
        "x": 0,
        "y": 0
      },
      "id": 2,
      "interval": "1h",
      "links": [],
      "maxDataPoints": 8760,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "pluginVersion": "9.0.0-18c3456dpre",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "grafanacloud-usage"
          },
          "editorMode": "code",
          "expr": "sum(grafanacloud_org_spend_commit_balance_total)\n-\nsum({__name__=~\"grafanacloud_org_(metrics|logs|logs_retention|traces|grafana)_overage\"})    \nand\nday_of_month() == days_in_month() and hour() == 23\n",
          "hide": false,
          "interval": "",
          "legendFormat": "Credit balance",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "Prepaid Spend Commit Balance By Month",
      "transformations": [],
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "grafanacloud-usage"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "axisSoftMin": 0,
            "fillOpacity": 80,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineWidth": 1,
            "scaleDistribution": {
              "type": "linear"
            }
          },
          "links": [],
          "mappings": [],
          "noValue": "0",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "rgb(150, 150, 150)",
                "value": null
              }
            ]
          },
          "unit": "currencyUSD"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 9,
        "w": 8,
        "x": 8,
        "y": 0
      },
      "id": 3,
      "interval": "1h",
      "links": [],
      "maxDataPoints": 8760,
      "options": {
        "barRadius": 0.05,
        "barWidth": 0.93,
        "groupWidth": 0.85,
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom"
        },
        "orientation": "auto",
        "showValue": "never",
        "stacking": "none",
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        },
        "xTickLabelRotation": 0,
        "xTickLabelSpacing": 0
      },
      "pluginVersion": "9.0.0-18c3456dpre",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "grafanacloud-usage"
          },
          "editorMode": "code",
          "expr": "sum(grafanacloud_org_metrics_overage) and day_of_month() == days_in_month() and hour() == 23",
          "hide": false,
          "interval": "",
          "legendFormat": "Metrics burn",
          "range": true,
          "refId": "A"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "grafanacloud-usage"
          },
          "editorMode": "code",
          "expr": "sum(grafanacloud_org_logs_overage) and day_of_month() == days_in_month() and hour() == 23",
          "hide": false,
          "interval": "",
          "legendFormat": "Logs ingestion burn",
          "range": true,
          "refId": "B"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "grafanacloud-usage"
          },
          "editorMode": "code",
          "expr": "sum(grafanacloud_org_logs_retention_overage) and day_of_month() == days_in_month() and hour() == 23",
          "hide": false,
          "interval": "",
          "legendFormat": "Logs retention burn",
          "range": true,
          "refId": "C"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "grafanacloud-usage"
          },
          "editorMode": "code",
          "expr": "sum(grafanacloud_org_traces_overage) and day_of_month() == days_in_month() and hour() == 23",
          "hide": false,
          "interval": "",
          "legendFormat": "Traces burn",
          "range": true,
          "refId": "D"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "grafanacloud-usage"
          },
          "editorMode": "code",
          "expr": "sum(grafanacloud_org_grafana_overage) and day_of_month() == days_in_month() and hour() == 23",
          "hide": false,
          "interval": "",
          "legendFormat": "Grafana users burn",
          "range": true,
          "refId": "E"
        }
      ],
      "title": "$ Spend By Service By Month",
      "type": "barchart"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "grafanacloud-usage"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "fixedColor": "orange",
            "mode": "fixed"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "axisSoftMin": 0,
            "fillOpacity": 80,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineWidth": 1,
            "scaleDistribution": {
              "type": "linear"
            }
          },
          "links": [],
          "mappings": [],
          "noValue": "$0",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "rgb(150, 150, 150)",
                "value": null
              }
            ]
          },
          "unit": "currencyUSD"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 9,
        "w": 8,
        "x": 16,
        "y": 0
      },
      "id": 4,
      "interval": "1h",
      "links": [],
      "maxDataPoints": 8760,
      "options": {
        "barRadius": 0.05,
        "barWidth": 0.65,
        "groupWidth": 0.7,
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom"
        },
        "orientation": "auto",
        "showValue": "never",
        "stacking": "none",
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        },
        "xTickLabelRotation": 0,
        "xTickLabelSpacing": 0
      },
      "pluginVersion": "9.0.0-18c3456dpre",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "grafanacloud-usage"
          },
          "editorMode": "code",
          "expr": "sum({__name__=~\"grafanacloud_org_(metrics|logs|logs_retention|traces|grafana)_overage\"}) and day_of_month() == days_in_month() and hour() == 23",
          "hide": false,
          "interval": "",
          "legendFormat": "Credit burn",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "Total Credit Burn By Month",
      "transformations": [],
      "type": "barchart"
    }
  ],
  "refresh": "",
  "rows": [],
  "schemaVersion": 14,
  "style": "dark",
  "tags": [
    "billing",
    "grafanacloud"
  ],
  "templating": {
    "list": []
  },
  "time": {
    "from": "now-1y",
    "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": "utc",
  "title": "Grafana Cloud Historical Spend",
  "uid": "historical_spend",
  "version": 0,
  "description": "See your monthly spend by product, and how fast you are burning through your spend commitment"
}