Skip to content

-list-targets should not require a config file #23734

Description

@chaudum

Describe the bug
Running loki -list-targets prints and exits with exit code 1.

failed parsing config: config.yaml,config/config.yaml does not exist, set config.file for custom config path

A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Run loki -list-targets

Expected behavior
The output shows all targets as when run loki -config.file=loki.yaml -list-targets.

Metadata

Metadata

Assignees

No one assigned

    Labels

    4.0Loki 4.0type/bugSomehing is not working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions