Heatmap from Prometheus Buckets stored in Grafana

  • What Grafana version and what operating system are you using?
    Grafana 9.4.3

  • What are you trying to achieve?
    Generate a heatmap from Prometheus-style buckets captured by Telegraf into InfluxDB v1.

  • How are you trying to achieve it?
    Followed the documentation for heatmaps, but the Influx datasource does not offer the ‘Heatmap’ option in Format As dropdown.

Tried with and without the ‘non_negative_difference’ function. The values looked closer to what I would expect with the difference applied.

  • What happened?
    Y-axis was not sorted by ‘le’ values.
    I’ve not been able to determine if the data is correct, but the heat colour doesn’t look as if it is correct.

  • What did you expect to happen?
    Grafana to understand prometheus format cumulative buckets in the Heatmap panel.

  • Can you copy/paste the configuration(s) that you are having problems with?
    {
    “type”: “heatmap”,
    “title”: “Delivery Status”,
    “gridPos”: {
    “x”: 0,
    “y”: 0,
    “w”: 12,
    “h”: 8
    },
    “id”: 46,
    “targets”: [
    {
    “datasource”: {
    “type”: “influxdb”,
    “uid”: “PC61D9CAFA4D33E15”
    },
    “refId”: “A”,
    “policy”: “default”,
    “resultFormat”: “time_series”,
    “orderByTime”: “ASC”,
    “tags”: ,
    “groupBy”: [
    {
    “type”: “time”,
    “params”: [
    “$__interval”
    ]
    },
    {
    “type”: “tag”,
    “params”: [
    “le”
    ]
    },
    {
    “type”: “fill”,
    “params”: [
    “null”
    ]
    }
    ],
    “select”: [
    [
    {
    “type”: “field”,
    “params”: [
    “DFM_Delivery_DeliveryStatusProcessorCamel_bucket”
    ]
    },
    {
    “type”: “last”,
    “params”:
    },
    {
    “type”: “non_negative_difference”,
    “params”:
    }
    ]
    ],
    “measurement”: “tomcat.prometheus”,
    “alias”: “Status $tag_le”
    }
    ],
    “fieldConfig”: {
    “defaults”: {
    “custom”: {
    “scaleDistribution”: {
    “type”: “linear”
    },
    “hideFrom”: {
    “tooltip”: false,
    “viz”: false,
    “legend”: false
    }
    }
    },
    “overrides”:
    },
    “datasource”: {
    “uid”: “PC61D9CAFA4D33E15”,
    “type”: “influxdb”
    },
    “pluginVersion”: “9.4.3”,
    “options”: {
    “calculate”: false,
    “yAxis”: {
    “axisPlacement”: “left”,
    “reverse”: false
    },
    “rowsFrame”: {
    “layout”: “auto”
    },
    “color”: {
    “mode”: “scheme”,
    “fill”: “dark-orange”,
    “scale”: “exponential”,
    “exponent”: 0.5,
    “scheme”: “Oranges”,
    “steps”: 64,
    “reverse”: false
    },
    “cellGap”: 1,
    “filterValues”: {
    “le”: 1e-9
    },
    “tooltip”: {
    “show”: true,
    “yHistogram”: false
    },
    “legend”: {
    “show”: true
    },
    “exemplars”: {
    “color”: “rgba(255,0,255,0.7)”
    }
    }
    }

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
    No errors

  • Did you follow any online instructions? If so, what is the URL?
    Attempted to follow instructions at How to visualize Prometheus histograms in Grafana | Grafana Labs