diff --git a/monitor/importer.go b/monitor/importer.go index 0e0310a..9536902 100644 --- a/monitor/importer.go +++ b/monitor/importer.go @@ -68,6 +68,9 @@ func (i *Importer) start() { "offsize": entry.Offset, "lag": entry.Logsize - entry.Offset, } + if entry.Offset < 0 { + fields["lag"] = -1 + } tm := time.Unix(msg.Timestamp/1000, 0) pt, err := client.NewPoint("consumer_metrics", tags, fields, tm)