json_exporter icon indicating copy to clipboard operation
json_exporter copied to clipboard

'--web.config.file' flag not existing

Open david-loe opened this issue 3 years ago • 4 comments

$ docker run -v $PWD/json_exporter/:/etc/config/ prometheuscommunity/json-exporter --config.file=/etc/config/config.yml --web.config.file=/etc/config/web.yml
json_exporter: error: unknown long flag '--web.config.file', try --help

The flag is named '--web.config' other than mentioned in Web Configuration

david-loe avatar Oct 19 '21 14:10 david-loe

Hello, I am having the same issue. The flag --web.config.file doesn't exist nor the --web.config. Any advice on this?

Andreas-Kreouzos avatar Oct 06 '22 11:10 Andreas-Kreouzos

'--web.config=/path/to/file/in/container' works for me

david-loe avatar Oct 06 '22 11:10 david-loe

When I am typing prometheus --help, the flag doesn't appear. Does it have to do with the version of Prometheus?

Andreas-Kreouzos avatar Oct 06 '22 12:10 Andreas-Kreouzos

This is not a flag for Prometheus but for json-exporter

david-loe avatar Oct 06 '22 12:10 david-loe

This has been resolved in https://github.com/prometheus-community/json_exporter/pull/199 now.

$ ./json_exporter --help
usage: json_exporter [<flags>]

Flags:
  -h, --help                    Show context-sensitive help (also try --help-long and --help-man).
      --config.file=config.yml  JSON exporter configuration file.
      --config.check            If true validate the config file and then exit.
      --web.listen-address=:7979 ...
                                Addresses on which to expose metrics and web interface. Repeatable for multiple addresses.
      --web.config.file=""      [EXPERIMENTAL] Path to configuration file that can enable TLS or authentication.
      --log.level=info          Only log messages with the given severity or above. One of: [debug, info, warn, error]
      --log.format=logfmt       Output format of log messages. One of: [logfmt, json]
      --version                 Show application version.

rustycl0ck avatar Dec 30 '22 02:12 rustycl0ck