提交 2db1eeb4 编写于 作者: B beorn7

Fix prometheus_rule_group_last_evaluation_timestamp_seconds

It should be a unix timestamp, not the seconds in the minute.
Signed-off-by: Nbeorn7 <beorn@soundcloud.com>
上级 62e591f9
...@@ -385,7 +385,7 @@ func (g *Group) GetEvaluationTimestamp() time.Time { ...@@ -385,7 +385,7 @@ func (g *Group) GetEvaluationTimestamp() time.Time {
// setEvaluationTimestamp updates evaluationTimestamp to the timestamp of when the rule group was last evaluated. // setEvaluationTimestamp updates evaluationTimestamp to the timestamp of when the rule group was last evaluated.
func (g *Group) setEvaluationTimestamp(ts time.Time) { func (g *Group) setEvaluationTimestamp(ts time.Time) {
g.metrics.groupLastEvalTime.WithLabelValues(groupKey(g.file, g.name)).Set(float64(ts.Second())) g.metrics.groupLastEvalTime.WithLabelValues(groupKey(g.file, g.name)).Set(float64(ts.UnixNano()) / 1e9)
g.mtx.Lock() g.mtx.Lock()
defer g.mtx.Unlock() defer g.mtx.Unlock()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册