Skip to content

队列服务器性能数据采集(以 kafka 为例)

队列服务器性能数据采集(以 kafka 为例)

Kafka & Kafka Exporter

todo 截图

  • ./kafka-server-start.sh-daemon../confg/server.properties
  • Zookeeper./zkClish-server localhost:2181
  • ./zkCli.sh-scrver localhost:2181
  • ./kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic test
  • ./kafka-console-producer.sh --broker-list localhost:9092 --topic test
  • bin/kafka:producer:perf-test.sh --topic test --num-records 1000 --record-size 1000 --throughput 200 --producer-props bootstrap.servers=172.0.0.1:9092
  • /kafka-consumer-perf-test.sh --broker-list 172.0.0.1:9092 --topic test --fetch-size 1048576 --messages 1000 --threads 1

todo 截图

  • tar -zxwf kafka_exporter-1.2.0.linux.amd64.tar.gz
  • cd kafka_exporter-1.2.0.linux-amd64
  • ./kafka_exporter --kafka.seryer=kafkaIP或者城名:9092&
  • docker pull danielgsi/kafka-exporter:latent
  • docker run -ti --rm -p 9308:9308 daniclqsj/kafka-exporter --kafka.server=localhost:9092
  • -job_name: 'kafka_experter'
  • static_confgs:
  • -targets: ['localhost:9308']