mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
lib/protoparser/csvimport: add missing metric vm_rows_invalid_total{type="csvimport"}
This commit is contained in:
parent
c1551a3269
commit
c8dc1cd218
1 changed files with 4 additions and 0 deletions
|
@ -4,6 +4,7 @@ import (
|
|||
"fmt"
|
||||
|
||||
"github.com/VictoriaMetrics/VictoriaMetrics/lib/logger"
|
||||
"github.com/VictoriaMetrics/metrics"
|
||||
"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 {
|
||||
logger.Errorf("error when parsing csv line %q: %s; skipping this line", line, sc.Error)
|
||||
invalidLines.Inc()
|
||||
continue
|
||||
}
|
||||
if len(metrics) == 0 {
|
||||
|
@ -139,3 +141,5 @@ func parseRows(sc *scanner, dst []Row, tags []Tag, metrics []metric, cds []Colum
|
|||
}
|
||||
return dst, tags, metrics
|
||||
}
|
||||
|
||||
var invalidLines = metrics.NewCounter(`vm_rows_invalid_total{type="csvimport"}`)
|
||||
|
|
Loading…
Reference in a new issue