我们经常面对着海量的数据流,需要高效地采集、存储和监控这些数据。在这个过程中,监控是至关重要的一环,它可以帮助我们及时发现问题、分析性能瓶颈,并做出相应的优化和调整。在大数据领域,Canal 是一个备受青睐的开源数据同步工具,结合 Prometheus 监控系统,可以实现对 Canal 的全面监控。
https://prometheus.io/download
tar -zxvf prometheus-2.23.0-rc.0.linux-amd64.tar.gz
- job_name: 'canal'
static_configs:
- targets: ['localhost:11112'] // 端口配置即为canal.properties中的canal.metrics.pull.port
nohup ./prometheus > ./prometheus.log 2>&1 &
如果要指定配置文件,则加上参数 --config.file。比如:./prometheus --config.file=prometheus.yml
http://loalhost:9090
Grafana 是一款开源的数据可视化平台,用于展示、查询和分析各种数据源的数据,经常和 Prometheus 配合使用,允许用户通过可视化仪表盘展示 Prometheus 数据。所以这里我们需要安装 Grafana。
https://grafana.com/grafana/download
tar -zxvf grafana-7.1.5.linux-amd64.tar.gz
nohup ./bin/grafana-server > ./logs/grafana.log 2>&1 &
http://localhost:8299
账号:admin / admin
往期推荐
原文作者:毛毛小妖的笔记;如有侵权,请联系管理员删除。