prometheus监控nginx

Posted redcock

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了prometheus监控nginx相关的知识,希望对你有一定的参考价值。

环境:

操作系统:lsb_release -a

Ubuntu 20.04.2

nginx :1.18.0

一:编译nginx

 

报错处理:

./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using --with-pcre=<path> option.

解决办法:
apt-get install libpcre3 libpcre3-dev -y
./configure: error: the HTTP gzip module requires the zlib library.
You can either disable the module by using --without-http_gzip_module
option, or install the zlib library into the system, or build the zlib library
statically from the source with nginx by using --with-zlib=<path> option.

解决办法:
apt install zlib1g zlib1g-dev -y

 

以上是关于prometheus监控nginx的主要内容,如果未能解决你的问题,请参考以下文章

用Prometheus细化Nginx监控

prometheus监控nginx

prometheus监控nginx

prometheus+grafana监控nginx

云原生系列之使用prometheus监控nginx

prometheus+grafana监控nginx