prometheus

1. 下载安装

wget https://github.com/prometheus/prometheus/releases/download/v2.9.2/prometheus-2.9.2.linux-amd64.tar.gz
tar -xvzf prometheus-2.9.2.linux-amd64.tar.gz
cd prometheus-2.9.2.linux-amd64
  • 修改prometheus.yml(如果有自己实现的api)
vim prometheus.yml

#在最后加入如下配置
  - job_name: 'metrics_test'
    scrape_interval:     3s
    # metrics_path defaults to '/metrics'
    # scheme defaults to 'http'.

    static_configs:
    - targets: ['192.168.163.1:22222']

promethues安装

2. 启动

#直接启动
./prometheus --config.file="prometheus.yml"
#后台启动
nohup ./prometheus --config.file="prometheus.yml" >/dev/null 2>&1 &

打开浏览器,输入IP+端口,9090为prometheus的默认侦听端口。

相关文章:

  • 2021-10-22
  • 2021-12-24
  • 2022-12-23
  • 2021-08-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-22
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-03-07
  • 2021-12-28
  • 2021-10-18
  • 2021-11-26
  • 2022-12-23
相关资源
相似解决方案