【问题标题】:How to limit prometheus data aggreagation with specific time range?如何限制特定时间范围内的普罗米修斯数据聚合?
【发布时间】:2020-12-09 13:25:45
【问题描述】:

我在业务场景中有一个 TPS 指标。我想在一段时间内获得百分位数。 如果我使用 zabbix 数据源,我会得到这个(我真正需要的):

grafana+zabbix+percentile.png

如果我使用 prometheus 数据源,我会得到:

grafana+prometheus+percentile.png

query: quantile_over_time(0.75, sum(metric_group{ metric="metric_name"})[3d:])

我想以 3 天的间隔在图表上获得几个点,就像在第一个图表中所做的那样。但是在使用 Prometheus 的情况下,我以 5 分钟的间隔而不是 3 天获得很多积分。 如何解决这个问题并限制这些数据?

【问题讨论】:

    标签: prometheus grafana promql


    【解决方案1】:

    尝试在 Grafana 的图形设置中将 min step 值设置为 3d。在https://grafana.com/docs/grafana/latest/datasources/prometheus/ 上查看有关 Grafana 中 min step 设置的更多详细信息。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-03-28
      相关资源
      最近更新 更多