普罗米修斯统计数据按天/周/月

时间:2019-01-20 14:51:32

标签: grafana prometheus promql

从我的Prometheus数据中,我想计算一个量表值在不同时间范围内的演变并将其显示在表格中,例如:

X = increased or decreased by n% from yesterday
X = increased or decreased by n% over last week
X = increased or decreased by n% from the previous month

数据示例

account_balance {account = "A", currency = "ETH", type = "total"} 0.0215896
account_balance {account = "A", currency = "MCO", type = "total"} 0.0098847
account_balance {account = "A", currency = "WAN", type = "total"} 0.00995828
account_balance {account = "A", currency = "XRP", type = "total"} 0.00599985
account_balance {account = "A", currency = "ZEN", type = "total"} 0.00870029

我什么都没看到:

sum (account_balance {type = "total"}) - sum (account_balance {type = "total"} offset 7d)

0 个答案:

没有答案