一种是通过nginx_exporter监控,需要开启nginx_stub_status,主要是nginx自身的status信息,metrics数据现对较少;另外一种使用nginx-vts-exporter监控,但是需要在编译nginx的时候添加nginx-module-vts模块,监控数据较多,提供了包含server、upstream以及cache的相关监控指标,指标更丰富,所以采用nginx-vts-exporter实现对nginx的监控...
./configure --prefix=/etc/nginx/ --sbin-path=/usr/local/bin/ --user=nginx --group=nginx --with-http_ssl_module --with-http_stub_status_module --with-stream --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log ...
scrape_configs:-job_name:volcengine static_configs:-targets:['192.168.1.110:9100','192.168.1.120:9100']# 定义了一个监控任务-job_name:nginx# 定义指标数据从哪个接口取# metrics_path: /status/format/prometheus# 定义prometheus去哪抓取指标static_configs:-targets:['192.168.1.119:8088'] 查看配置的目标...
controller_namespace="kube-system",controller_pod="nginx-ingress-controller-6fdbbc5856-pcxkz",host="my.otel-demo.com",ingress="my-otel-demo",method="GET",namespace="default",path="/",service="my-otel-demo-frontendproxy",status="308"} 15709...
使用的是 nginx-lua-prometheus 这个库,负责去采集 nginx 内部的指标,暴露给 Prometheus 拉取 2 安装 [root@VM-10-48-centos logs]# wget -O /etc/yum.repos.d/openresty.repo https://openresty.org/package/centos/openresty.repo [root@VM-10-48-centos logs]# yum install -y openresty ...
即Nginx Ingress Controller Pod 的负载情况,当 CPU 、内存等资源水位处于饱和或过载,会导致集群对外服务不稳定。针对“工作负载监控”,一般建议关注 “USE” 指标,即:使用率(Utilization)、饱和度(Saturation)、错误率(Errors)。对此,阿里云 Prometheus 监控提供了预置性能监控大盘,可参考《工作负载性能监控组件接入》[...
国内用Nginx的比较多,Nginx的监控比较老的方案可能是通过跑脚本定期收集nginx的status模块的数据,或者监控nginx的日志;后来阿里的tengine在国内开始流行,于是诞生了很多不错的lua模块;但是这些监控方案在有新的监控需求的时候,可能就需要再修改脚本或者更改nginx conf配置,有时候不是特别的方便。用Prometheus进行nginx的监控...
一般体现 HTTP 流量的监控指标,URL Path 是个很难处理的对象,如果直接将每个请求的 URL Path 加入到指标标签作为分析用途,将产生可怕的“维度爆炸”问题,可如果不加入这个信息,又无法实现指标细粒度的下钻分析。 Nginx Ingress 暴露的指标中,通过 path标签记录 Ingress 规则中对应的请求路径字段,如“/(.+)”、“...
因此,提供一张聚焦、好用的大盘,也是实现 “Nginx Ingress 网关监控” 无法回避的事情。 基于访问日志统计 综上所述,基于 Nginx Ingress 原生的自监控指标在生产实践中存在诸多问题,阿里云 Prometheus 监控提供的 “Nginx Ingress 网关监控” 则采用另一种——基于访问日志统计的方式。