Grafana dashboard: GrafanaCloud Logs Billing/Usage
Description: GrafanaCloud Hosted Logs Billing and Usage Information

# GrafanaCloud Logs Billing Dashboard

This dashboard was designed to give GrafanaCloud customers insight into the data used to calculate billing and pricing for their hosted logs instances. It provides visualizations of billing relevant information such as average ingestion rate, daily ingestion rate and total ingestion rate. It also gives insight into any series that were discarded upon ingestion due to a variety of reasons.

{
  "__inputs": [
    {
      "description": "",
      "label": "prometheus",
      "name": "DS_PROMETHEUS",
      "pluginId": "prometheus",
      "pluginName": "Prometheus",
      "type": "datasource"
    }
  ],
  "__requires": [
    {
      "id": "grafana",
      "name": "Grafana",
      "type": "grafana",
      "version": "5.0.0"
    },
    {
      "id": "graph",
      "name": "Graph",
      "type": "panel",
      "version": "5.0.0"
    },
    {
      "id": "prometheus",
      "name": "Prometheus",
      "type": "datasource",
      "version": "5.0.0"
    },
    {
      "id": "singlestat",
      "name": "Singlestat",
      "type": "panel",
      "version": "5.0.0"
    }
  ],
  "annotations": {
    "list": []
  },
  "editable": false,
  "gnetId": 11539,
  "graphTooltip": 0,
  "hideControls": false,
  "id": null,
  "links": [],
  "panels": [
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": false,
      "colors": [
        "#299c46",
        "rgba(237, 129, 40, 0.89)",
        "#d44a3a"
      ],
      "datasource": "${DS_PROMETHEUS}",
      "description": "50th percentile of ingested MB per second over dashboard time range",
      "format": "short",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 3,
        "w": 8,
        "x": 0,
        "y": 0
      },
      "id": 2,
      "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"
        }
      ],
      "span": 4,
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": false
      },
      "tableColumn": "",
      "targets": [
        {
          "expr": "quantile_over_time(0.50, (sum(grafanacloud_logs_instance_bytes_received_per_second{id=~\"$id\"}/1e6))[$__range:1m])",
          "format": "time_series",
          "instant": true,
          "intervalFactor": 2,
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "thresholds": "",
      "title": "Ingestion Rate Average (MB/sec)",
      "type": "singlestat",
      "valueFontSize": "80%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "avg"
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_PROMETHEUS}",
      "fill": 1,
      "gridPos": {
        "h": 9,
        "w": 8,
        "x": 0,
        "y": 3
      },
      "id": 3,
      "legend": {
        "alignAsTable": true,
        "avg": true,
        "current": true,
        "max": true,
        "min": true,
        "rightSide": false,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "repeat": null,
      "seriesOverrides": [],
      "spaceLength": 10,
      "span": 4,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "sum by (id) (grafanacloud_logs_instance_bytes_received_per_second{id=~\"$id\"})/1e6",
          "format": "time_series",
          "intervalFactor": 2,
          "legendFormat": "{{ id }}",
          "refId": "A"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeShift": null,
      "title": "Ingestion Rate (MB/sec)",
      "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
        }
      ]
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_PROMETHEUS}",
      "description": "total number of samples discarded due to errors on ingestion.",
      "fill": 1,
      "gridPos": {
        "h": 9,
        "w": 8,
        "x": 8,
        "y": 10
      },
      "id": 4,
      "legend": {
        "alignAsTable": true,
        "avg": false,
        "current": false,
        "max": true,
        "min": false,
        "rightSide": false,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "repeat": null,
      "seriesOverrides": [],
      "spaceLength": 10,
      "span": 4,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "expr": "sum(grafanacloud_logs_instance_samples_discarded_per_second{id=~\"$id\"}*60) by (id, reason)",
          "format": "time_series",
          "intervalFactor": 2,
          "legendFormat": "{{id}} - {{reason}}",
          "refId": "A"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeShift": null,
      "title": "Discarded Samples",
      "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
        }
      ]
    },
    {
      "cacheTimeout": null,
      "colorBackground": false,
      "colorValue": false,
      "colors": [
        "#299c46",
        "rgba(237, 129, 40, 0.89)",
        "#d44a3a"
      ],
      "datasource": "${DS_PROMETHEUS}",
      "description": "Total ingested traffic per dashboard interval",
      "format": "bytes",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 3,
        "w": 8,
        "x": 8,
        "y": 0
      },
      "id": 5,
      "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"
        }
      ],
      "span": 4,
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": false
      },
      "tableColumn": "",
      "targets": [
        {
          "expr": "sum(sum_over_time((grafanacloud_logs_instance_bytes_received_per_second{id=~\"$id\"}*60)[$__range:1m]))",
          "format": "time_series",
          "instant": true,
          "intervalFactor": 2,
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "thresholds": "",
      "title": "Ingestion Total",
      "type": "singlestat",
      "valueFontSize": "80%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "avg"
    },
    {
      "aliasColors": {},
      "bars": true,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_PROMETHEUS}",
      "fill": 0,
      "gridPos": {
        "h": 9,
        "w": 16,
        "x": 0,
        "y": 19
      },
      "id": 6,
      "legend": {
        "alignAsTable": true,
        "avg": true,
        "current": true,
        "max": true,
        "min": true,
        "rightSide": false,
        "show": true,
        "total": false,
        "values": true
      },
      "lines": false,
      "linewidth": 1,
      "links": [],
      "nullPointMode": "null",
      "percentage": false,
      "pointradius": 5,
      "points": false,
      "renderer": "flot",
      "repeat": null,
      "seriesOverrides": [],
      "spaceLength": 10,
      "span": 4,
      "stack": true,
      "steppedLine": false,
      "targets": [
        {
          "expr": "sum by (id) (sum_over_time((grafanacloud_logs_instance_bytes_received_per_second{id=~\"$id\"}*60)[1d:1m]))",
          "format": "time_series",
          "interval": "1d",
          "intervalFactor": 2,
          "legendFormat": "{{ id }} Usage Per Day",
          "refId": "A"
        }
      ],
      "thresholds": [],
      "timeFrom": null,
      "timeShift": null,
      "title": "Ingestion Total -- By Day",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "type": "graph",
      "xaxis": {
        "buckets": null,
        "mode": "time",
        "name": null,
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "format": "bytes",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        },
        {
          "format": "bytes",
          "label": null,
          "logBase": 1,
          "max": null,
          "min": null,
          "show": true
        }
      ]
    }
  ],
  "refresh": "",
  "rows": [],
  "schemaVersion": 16,
  "style": "dark",
  "tags": [
    "billing"
  ],
  "templating": {
    "list": [
      {
        "current": {
          "text": "null",
          "value": "null"
        },
        "hide": 2,
        "label": null,
        "name": "datasource",
        "options": [
          {
            "selected": true,
            "text": "null",
            "value": "null"
          }
        ],
        "query": "null",
        "type": "constant"
      },
      {
        "allValue": ".*",
        "datasource": "${DS_PROMETHEUS}",
        "hide": 0,
        "includeAll": true,
        "label": "instance name",
        "multi": true,
        "name": "name",
        "options": [],
        "query": "label_values(grafanacloud_logs_instance_info, name)",
        "refresh": 1,
        "regex": "",
        "type": "query"
      },
      {
        "datasource": "${DS_PROMETHEUS}",
        "hide": 0,
        "includeAll": true,
        "label": "instance id",
        "multi": true,
        "name": "id",
        "options": [],
        "query": "label_values(grafanacloud_logs_instance_info{name=~\"$name\"}, id)",
        "refresh": 1,
        "regex": "",
        "type": "query"
      }
    ]
  },
  "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": "browser",
  "title": "GrafanaCloud Logs Billing/Usage",
  "version": 0,
  "description": "GrafanaCloud Hosted Logs Billing and Usage Information"
}