安装普罗米修斯
wget
https://github.com/prometheus/prometheus/releases/download/v2.3.2/prometheus-2.3.2.linux-amd64.tar.gz
tar -xvf prometheus-2.3.2.linux-amd64.tar.gz
启动
./prometheus
网页端口 ip:9090
安装kafka_exporter
wget https://github.com/danielqsj/kafka_exporter/releases/download/v1.2.0/kafka_exporter-1.2.0.linux-amd64.tar.gz
tar -zxvf kafka_exporter-1.2.0.linux-amd64.tar.gz
启动
./kafka_exporter --kafka.server=kafkaIP或者域名:9092 &
整合kafka 和 prometheus
修改prometheus.xml
- job_name: ‘kafka’
static_configs:
- targets: [‘192.168.248.136:9308’]
labels:
instance: kafka@192.168.248.136
重启prometheus



