安装Nginx及stub_status模块
安装Nginx-exporter
# 下载
wget https://github.com/nginxinc/nginx-prometheus-exporter/releases/download/v0.11.0/nginx-prometheus-exporter_0.11.0_linux_amd64.tar.gz
# 解压
tar -zxvf nginx-prometheus-exporter_0.11.0_linux_amd64.tar.gz
# 启动
cd nginx-prometheus-exporter
./nginx-prometheus-exporter -nginx.scrape-uri=http://192.168.137.10:80/stub_status //这里需要改成自己的地址
修改Prometheus配置文件
scrape_configs:
- job_name: 'nginx'
scrape_interval: 10s
static_configs:
- targets: ['192.168.137.10:9113']
Nginx-exporter预览地址
Prometheus展示页面
标签:exporter,nginx,prometheus,笔记,Nginx,Prometheus,192.168 From: https://www.cnblogs.com/jruing/p/17412523.html