From 787eb1e9048ca918cd8a6a5553d0756cd0662370 Mon Sep 17 00:00:00 2001 From: Ganesh Vernekar Date: Thu, 31 Jan 2019 15:37:58 +0530 Subject: [PATCH] Set rule_group_last_duration_seconds to seconds (#5153) Signed-off-by: Ganesh Vernekar --- rules/manager.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules/manager.go b/rules/manager.go index 4a001a9e8..f901d8c56 100644 --- a/rules/manager.go +++ b/rules/manager.go @@ -369,7 +369,7 @@ func (g *Group) GetEvaluationDuration() time.Duration { // setEvaluationDuration sets the time in seconds the last evaluation took. func (g *Group) setEvaluationDuration(dur time.Duration) { - g.metrics.groupLastDuration.WithLabelValues(groupKey(g.file, g.name)).Set(float64(dur)) + g.metrics.groupLastDuration.WithLabelValues(groupKey(g.file, g.name)).Set(dur.Seconds()) g.mtx.Lock() defer g.mtx.Unlock()