How can I visualize a histogram with Promdash or Grafana?

后端 未结 4 785
花落未央
花落未央 2021-02-05 02:42

I\'m attracted to prometheus by the histogram (and summaries) time-series, but I\'ve been unsuccessful to display a histogram in either promdash or grafana. What I expect is to

4条回答
  •  面向向阳花
    2021-02-05 03:18

    The Answer from @brian-brazil above works almost, with some additional, not mentioned things, to be done.

    You can do a standard non-stacked graph of the rate a histogram, and as Prometheus histograms are cumulative you'll get the result you're looking for.

    1. The x-axis in Grafana needs to be in mode series
    2. You need to aggregate the results by the le label, if you use additional distinct labels for the series

    After that you'll get a beautiful histogram. The only thing that grinds my gears is that the x-axis sort order of grafana is natural string sorting. So the x axis starts with +Inf, then 0.1,0.2, .. 1,1.5,10,2,...

    PS: In grafana 5.1 there will be working heatmap with prometheus datasource out-of-box. There was an issue for native support for heatmap visualization, which is also appropriate (if you want to see tendency/history) for visualizing histograms over time.

提交回复
热议问题