Skip to content

Conversation

@madalinpopa
Copy link

This PR corrects a documentation example that showed paths with a single scalar string. In the grok_exporter config schema, paths must be a YAML list ([]string). For a single glob, either use path (single string) or keep paths as a one‑item list. The current example can mislead users and cause YAML/schema validation errors at startup.

Problem

The docs currently show:

- type: counter
  name: alice_occurrences_total
  help: number of log lines containing alice
  match: 'alice'
  paths: /tmp/example/*.log      # <-- scalar used for `paths` (wrong type)
  labels:
    logfile: '{{base .logfile}}'
  • paths is defined in the config as a list of strings (see the PathsAndGlobs struct: Path string, Paths []string).
  • Using a scalar under paths can yield errors like cannot unmarshal !!str into []string or simply fail validation, depending on the parser/version.
  • Elsewhere in the same document, paths is shown as a list, which makes this example inconsistent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant