prometheus+grafana监控nginx
被监控机器环境搭建&配置 编译环境: yum -y install gcc gcc-c++ pcre pcre-devel zlib zlib-devel openssl openssl-devel 安装nginx: wget nginx.org/download/nginx-1.15.7.tar.gz ./configure --add-module=/usr/local/nginx-module-vts/ nginx配置server中添加: location /status { vhost_traffic_status_display; vhost_traffic_status_display_format html; } } http中添加: vhost_traffic_status_zone; 完成以上步骤可以访问: 安装nginx-vts-exporter wget -O nginx-vts-exporter-0.5.zip https://github.com/hnlq715/nginx-vts-exporter/archive/v0.5.zip unzip nginx-vts-exporter-0.5.zip mv nginx-vts-exporter-0.5 /usr/local/prometheus/nginx-vts-exporter chmod +x /usr