Prometheus监控kafka

DevOps Prometheus评论917字数 1339阅读4分27秒阅读模式

Kafka现有开源的集群监控方案:kafka-manager、kafka-monitor、kafka-eagle、KafkaOffsetMonitor,但有所限制监控指标被固化,不易扩展、预警功能弱。Kafka集群的监控方案倾向于使用Grafana + Prometheus,监控数据采集器使用Kafka_exporter。

更多资料介绍点我

安装配置

root@bjzhanjiserver:~# wget https://github.com/danielqsj/kafka_exporter/releases/download/v1.6.0/kafka_exporter-1.6.0.linux-amd64.tar.gz 
root@bjzhanjiserver:~# tar zxf kafka_exporter-1.6.0.linux-amd64.tar.gz -C /usr/local/
root@bjzhanjiserver:/usr/local# mv /usr/local/kafka_exporter-1.6.0.linux-amd64 /usr/local/kafka_exporter
root@bjzhanjiserver:/usr/local#
cat > /etc/systemd/system/kafka_exporter.service << "EOF"
[Unit]
Description=kafka_exporter
After=local-fs.target network-online.target network.target
Wants=local-fs.target network-online.target network.target
 
root@bjzhanjiserver:/usr/local#
[Service]
ExecStart=/usr/local/kafka_exporter/kafka_exporter --kafka.server=127.0.0.1:9092
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
 
root@bjzhanjiserver:/usr/local# systemctl daemon-reload
root@bjzhanjiserver:/usr/local# systemctl start kafka_exporter
root@bjzhanjiserver:/usr/local# systemctl status kafka_exporter
root@bjzhanjiserver:/usr/local# systemctl enable kafka_exporter

浏览器访问

Prometheus监控kafka

Prometheus配置

  - job_name: 'kafka-exporter'
    metrics_path: /metrics
    scrape_interval: 15s
    scrape_timeout: 10s
    static_configs:
    - targets:
      - 192.168.1.230:9308
      labels:
        name: zhanji

Prometheus监控kafka

grfana

  • 使用21078

Prometheus监控kafka

继续阅读
DevOps
  • 本文由 发表于 2024年6月14日 22:28:54
  • 除非特殊声明,本站文章均为原创,转载请务必保留本文链接
Prometheus Prometheus

Prometheus

版本 CentOS Linux release 7.9 Prometheus:prometheus-2.52.0.linux-amd64 Alertmanager:alertma...
prometheus告警规则 Prometheus

prometheus告警规则

基础监控 主机内存不足 节点内存已满(剩余 < 10%) groups: - name: Node memory is filling up (< 10% left) rul...
评论  0  访客  0

发表评论