VictoriaMetrics/VictoriaMetrics · error

cannot parse time format from the entry #%d %q: %w

Error message

cannot parse time format from the entry #%d %q: %w

What it means

Wrapper in ParseColumnDescriptors around parseTimeFormat: the extension of a `time:` entry is not one of the supported formats (unix_s, unix_ms, unix_ns, rfc3339); the entry is echoed with the wrapped reason.

Source

Thrown at lib/protoparser/csvimport/column_descriptor.go:89

		}
		if pos <= 0 {
			return nil, fmt.Errorf("<column_pos> cannot be smaller than 1; got %d for entry #%d %q", pos, i+1, col)
		}
		if pos > maxColumnsPerRow {
			return nil, fmt.Errorf("<column_pos> cannot be bigger than %d; got %d for entry #%d %q", maxColumnsPerRow, pos, i+1, col)
		}
		if pos > maxPos {
			maxPos = pos
		}
		typ := a[1]
		switch typ {
		case "time":
			if hasTimeCol {
				return nil, fmt.Errorf("duplicate time column has been found at entry #%d %q for %q", i+1, col, s)
			}
			parseTimestamp, err := parseTimeFormat(a[2])
			if err != nil {
				return nil, fmt.Errorf("cannot parse time format from the entry #%d %q: %w", i+1, col, err)
			}
			cd.ParseTimestamp = parseTimestamp
			hasTimeCol = true
		case "label":
			cd.TagName = a[2]
			if len(cd.TagName) == 0 {
				return nil, fmt.Errorf("label name cannot be empty in the entry #%d %q", i+1, col)
			}
		case "metric":
			cd.MetricName = a[2]
			if len(cd.MetricName) == 0 {
				return nil, fmt.Errorf("metric name cannot be empty in the entry #%d %q", i+1, col)
			}
			hasValueCol = true
		default:
			return nil, fmt.Errorf("unknown <column_type>: %q; allowed values: time, metric, label", typ)
		}
		pos--

View on GitHub (pinned to 5079fb58f1)

Solutions

  1. Use one of the supported time formats: `time:unix_s`, `time:unix_ms`, `time:unix_ns`, or `time:rfc3339`
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at lib/protoparser/csvimport/column_descriptor.go:89 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of VictoriaMetrics/VictoriaMetrics@5079fb58f1 (2026-09-03). Data as JSON: /api/errors/63877309997ef5e5. Report an issue: GitHub.