kafka-exporter部署手册
kafka-exporter部署手册来源:https://github.com/danielqsj/kafka_exporter说明:Prometheus 的 Kafka 导出器。有关 Kafka 的其他指标,请查看 JMX 导出器JMX 导出器。兼容性:Apache Kafka 版本 0.10.1.0及以上。部署方式:docker方式:docker pull danielqsj/kafka-ex
·
kafka-exporter部署手册
来源
https://github.com/danielqsj/kafka_exporter
说明
Prometheus 的 Kafka 导出器。有关 Kafka 的其他指标,请查看 JMX 导出器JMX 导出器。
兼容性
Apache Kafka 版本 0.10.1.0及以上。
部署方式:
docker方式
docker pull danielqsj/kafka-exporter:latest
二进制文件方式
解压进入当前项目目录后执行 ./kafka_exporter --help 可查看具体配置方式:
usage: kafka_exporter [<flags>]
Flags:
-h, --help Show context-sensitive help (also try --help-long
and --help-man).
--web.listen-address=":9308"
Address to listen on for web interface and
telemetry.
--web.telemetry-path="/metrics"
Path under which to expose metrics.
--topic.filter=".*" Regex that determines which topics to collect.
--group.filter=".*" Regex that determines which consumer groups to
collect.
--log.enable-sarama Turn on Sarama logging.
--kafka.server=kafka:9092 ...
Address (host:port) of Kafka server.
--sasl.enabled Connect using SASL/PLAIN.
--sasl.handshake Only set this to false if using a non-Kafka SASL
proxy.
--sasl.username="" SASL user name.
--sasl.password="" SASL user password.
--tls.enabled Connect using TLS.
--tls.ca-file="" The optional certificate authority file for TLS
client authentication.
--tls.cert-file="" The optional certificate file for client
authentication.
--tls.key-file="" The optional key file for client authentication.
--tls.insecure-skip-tls-verify
If true, the server's certificate will not be
checked for validity. This will make your HTTPS
connections insecure.
--kafka.version="1.0.0" Kafka broker version
--log.level="info" Only log messages with the given severity or
above. Valid levels: [debug, info, warn, error,
fatal]
--log.format="logger:stderr"
Set the log target and format. Example:
"logger:syslog?appname=bob&local=7" or
"logger:stdout?json=true"
--version Show application version.
可根据需求自定义部署;
注:
该exporter支持多台kafka方式部署:
docker run -ti --rm -p 9308:9308 danielqsj/kafka-exporter --kafka.server=kafka:9092 [--kafka.server=another-server ...]
kafka_exporter --kafka.server=kafka:9092 [--kafka.server=another-server ...]
具体配置描述
Flag name | Default | Description |
---|---|---|
kafka.server | kafka:9092 | Addresses (host:port) of Kafka server |
kafka.version | 1.0.0 | Kafka broker version |
sasl.enabled | false | Connect using SASL/PLAIN |
sasl.handshake | true | Only set this to false if using a non-Kafka SASL proxy |
sasl.username | SASL user name | |
sasl.password | SASL user password | |
sasl.mechanism | SASL mechanism can be plain, scram-sha512, scram-sha256 | |
sasl.service-name | Service name when using Kerberos Auth | |
sasl.kerberos-config-path | Kerberos config path | |
sasl.realm | Kerberos realm | |
sasl.keytab-path | Kerberos keytab file path | |
sasl.kerberos-auth-type | Kerberos auth type. Either ‘keytabAuth’ or ‘userAuth’ | |
tls.enabled | false | Connect using TLS |
tls.ca-file | The optional certificate authority file for TLS client authentication | |
tls.cert-file | The optional certificate file for client authentication | |
tls.key-file | The optional key file for client authentication | |
tls.insecure-skip-tls-verify | false | If true, the server’s certificate will not be checked for validity |
topic.filter | .* | Regex that determines which topics to collect |
group.filter | .* | Regex that determines which consumer groups to collect |
web.listen-address | :9308 | Address to listen on for web interface and telemetry |
web.telemetry-path | /metrics | Path under which to expose metrics |
log.level | info | Only log messages with the given severity or above. Valid levels: [debug, info, warn, error, fatal] |
log.enable-sarama | false | Turn on Sarama logging |
更多推荐
已为社区贡献4条内容
所有评论(0)