update field keys
parent
2de52834f0
commit
aa762b96df
|
@ -394,7 +394,7 @@ func (s *Service) ExecuteContinuousQuery(dbi *meta.DatabaseInfo, cqi *meta.Conti
|
|||
|
||||
if s.queryStatsEnabled && s.Monitor.Enabled() {
|
||||
tags := map[string]string{"db": dbi.Name, "cq": cq.Info.Name}
|
||||
fields := map[string]interface{}{"duration": int64(execDuration), "written": written, "startTime": startTime.UnixNano(), "endTime": endTime.UnixNano()}
|
||||
fields := map[string]interface{}{"durationNs": int64(execDuration), "pointsWrittenOK": written, "startTime": startTime.UnixNano(), "endTime": endTime.UnixNano()}
|
||||
p, _ := models.NewPoint("cq_query", models.NewTags(tags), fields, time.Now())
|
||||
s.Monitor.WritePoints(models.Points{p})
|
||||
}
|
||||
|
|
|
@ -420,7 +420,7 @@ func TestService_ExecuteContinuousQuery_LogsToMonitor(t *testing.T) {
|
|||
}
|
||||
|
||||
f, _ := point.Fields()
|
||||
if got, ok := f["written"].(int64); !ok || got != writeN {
|
||||
if got, ok := f["pointsWrittenOK"].(int64); !ok || got != writeN {
|
||||
t.Errorf("unexpected value for written; exp=%d, got=%d", writeN, got)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue