安装
官网下载压缩包解压即可
启动&重启promethues
./promethues --config.file=promethues.yml
# 找出pid
pgrep -f prometheus
# 重启
kill -HUP 1527
port:9090
参考:https://www.robustperception.io/reloading-prometheus-configuration
启动grafana
service grafana-server start
port:3000
配置Target
在promethues目录下修改配置文件prometheus.yml加入自己的应用提供的metrics接口。如 http://192.168.197.4:8080/actuator/prometheus
- job_name: 'spring-actuator'
metrics_path: '/actuator/prometheus'
scrape_interval: 15s
static_configs:
- targets: ['192.168.197.4:8081','192.168.197.4:8080']
网友评论