Skip to content

validate promtail config via a dedicated flag #3445

Closed
@landryb

Description

@landryb

as was done for loki in #2737 for #2713 it would be great if promtail had a flag to just validate the config file and exit (with the corresponding exit status). That would allow for seamless deployment/validation of promtail configs by ansible for example.

for example, i have this for loki:

- name: Template loki configuration
  template:
    src: config.yml.j2
    dest: /opt/loki/config.yml
    validate: "/opt/loki/loki-linux-amd64 -verify-config -config.file %s"
  notify: restart loki

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleA stale issue or PR that will automatically be closed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions