mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-20 07:19:17 +01:00
lib/protoparser/csvimport: add missing metric vm_rows_invalid_total{type="csvimport"}
This commit is contained in:
parent
c1551a3269
commit
c8dc1cd218
@ -4,6 +4,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/VictoriaMetrics/VictoriaMetrics/lib/logger"
|
"github.com/VictoriaMetrics/VictoriaMetrics/lib/logger"
|
||||||
|
"github.com/VictoriaMetrics/metrics"
|
||||||
"github.com/valyala/fastjson/fastfloat"
|
"github.com/valyala/fastjson/fastfloat"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -119,6 +120,7 @@ func parseRows(sc *scanner, dst []Row, tags []Tag, metrics []metric, cds []Colum
|
|||||||
}
|
}
|
||||||
if sc.Error != nil {
|
if sc.Error != nil {
|
||||||
logger.Errorf("error when parsing csv line %q: %s; skipping this line", line, sc.Error)
|
logger.Errorf("error when parsing csv line %q: %s; skipping this line", line, sc.Error)
|
||||||
|
invalidLines.Inc()
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if len(metrics) == 0 {
|
if len(metrics) == 0 {
|
||||||
@ -139,3 +141,5 @@ func parseRows(sc *scanner, dst []Row, tags []Tag, metrics []metric, cds []Colum
|
|||||||
}
|
}
|
||||||
return dst, tags, metrics
|
return dst, tags, metrics
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var invalidLines = metrics.NewCounter(`vm_rows_invalid_total{type="csvimport"}`)
|
||||||
|
Loading…
Reference in New Issue
Block a user