一、基础资料
1、mac安装Prometheus + Grafana
https://www.cnblogs.com/robots2/p/18689540
2、配置文档
https://amoro.apache.org/docs/0.7.1/deployment/#configure-metric-reporter
3、Grafana配置内容
https://github.com/apache/amoro/blob/master/grafana/dashboard.json
二、Amoro配置内容
1、修改配置文件
$AMORO_CONF_DIR/plugins/metric-repoters.yaml
metric-reporters:- name: prometheus-exporter # configs for prometheus exporterenabled: trueproperties:port: 9090 # the port that the prometheus-exporter listens on.
2、重启生效(hadoop用户)
sh ams.sh restart
3、检测端口是否存活
lsof -i:9090
三、Prometheus配置内容
1、修改配置文件
/opt/homebrew/etc/prometheus.yml
2、配置内容
global:scrape_interval: 15sscrape_configs:- job_name: "prometheus"static_configs:- targets: ["localhost:9090"]
3、启动方式
(1)后台运行(推荐)
cd /opt/homebrew/Cellar/prometheus/3.1.0/bin
prometheus --config.file=/opt/homebrew/etc/prometheus.yml &
四、Grafana配置数据源,设置看板
1、初始化配置,新增数据源
参考博客初始化,并增加prometheus数据源
https://www.cnblogs.com/robots2/p/18689540
2、Grafana导入看板
3、上传json文件或者复制json方式创建看板
json内容:https://github.com/apache/amoro/blob/master/grafana/dashboard.json
4、导入后效果