diff --git a/rules/manager.go b/rules/manager.go index 586853f4c5..5cc91a485b 100644 --- a/rules/manager.go +++ b/rules/manager.go @@ -198,10 +198,10 @@ func (m *Manager) queueAlertNotifications(rule *AlertingRule, timestamp model.Ti } tmplData := struct { Labels map[string]string - Value model.SampleValue + Value float64 }{ Labels: l, - Value: aa.Value, + Value: float64(aa.Value), } // Inject some convenience variables that are easier to remember for users // who are not used to Go's templating system. diff --git a/storage/local/series.go b/storage/local/series.go index 5de11fcdae..707209872b 100644 --- a/storage/local/series.go +++ b/storage/local/series.go @@ -533,7 +533,7 @@ func (it *memorySeriesIterator) ValueAtTime(t model.Time) []model.SamplePair { it.chunkIt = it.chunkIterator(l - i + 1) return []model.SamplePair{ sp1, - model.SamplePair{ + { Timestamp: it.chunkIt.timestampAtIndex(0), Value: it.chunkIt.sampleValueAtIndex(0), },