danielqsj / kafka_exporter

Kafka exporter for Prometheus
Apache License 2.0
2.22k stars 618 forks source link

kafka_exporter: error: unexpected true, try --help #456

Open sunxuming2018 opened 3 months ago

sunxuming2018 commented 3 months ago

--server. tls. enabled=true. Setting either true or false will result in an error.

kafka_exporter --kafka.server=IP:9092 --web.listen-address=:9309 --server.tls.enabled=true --server.tls.cert-file=kafka_exporter.crt --server.tls.key-file=kafka_exporter.key

kafka_exporter: error: unexpected true, try --help

omarfakhreddine commented 3 months ago

This section helps explain how to deal with this.

You need to use --server.tls.enabled to set enable it and --no-server.tls.enabled for true/false arguments

sunxuming2018 commented 3 months ago

Setting -- server. tls. enabled=enable -- no server. tls. enabled=true still reports an error. ./kafka_exporter --kafka.server=10.26.248.252:9092 --web.listen-address=:9308 --server.tls.enabled=enable --no-server.tls.enabled=true --server.tls.cert-file=kafka_exporter.crt --server.tls.key-file=kafka_exporter.key kafka_exporter: error: unexpected enable, try --help

The version information is as follows. kafka_exporter, version 1.8.0 (branch: HEAD, revision: 477643dd764c46ddd804ac4bd4022be877e3085b) build user: root@1badbd8df021 build date: 20240820-07:05:57 go version: go1.23.0 platform: linux/amd64 tags: netgo