10.5 监控nginx
通过prometheus监控nginx
需要在编译的时候添加nginx-module-vts模块
github地址:https://github.com/vozlt/nginx-module-vts
10.5.1 编译安装nginx
root@node2:~# cd /usr/local/src/
root@node2:/usr/local/src# git clone git://github.com/vozlt/nginx-module-vts.git
root@node2:/usr/local/src# wget http://nginx.org/download/nginx-1.22.0.tar.gz
root@node2:/usr/local/src# tar xf nginx-1.22.0.tar.gz
root@node2:/usr/local/src# cd nginx-1.22.0/
root@node2:/usr/local/src# apt -y install make gcc libpcre3 libpcre3-dev openssl libssl-dev zlib1g-dev
root@node2:/usr/local/src# .