sysulq / nginx-vts-exporter

Simple server that scrapes Nginx vts stats and exports them via HTTP for Prometheus consumption
https://sysulq.github.io/nginx-vts-exporter/
MIT License
645 stars 142 forks source link

Illegal host header , invalid host #80

Open linuxhub opened 5 years ago

linuxhub commented 5 years ago

Illegal host header , invalid host Prometheus many invalid host metrics tag Causes too much influxDB SERIES For example,

curl http://127.0.0.1 -H 'Host: www.linuxhub.org'
curl http://127.0.0.1 -H 'Host: test'
curl http://127.0.0.1 -H 'Host: xxx'

Record a lot of invalid hosts

linuxhub commented 5 years ago

产生很多乱七八糟 与 nginx service name 无关 host 到 Prometheus , 如果 Prometheus 远端存储 用了 influxDB 存储数据,时间线数量猛增,直接完爆时序数据库。 * 建议加个host正则过滤配置

sysulq commented 5 years ago

建议通过规范nginx配置解决这个问题

It is suggested to adjust nginx configuration to solve this problem

panhow commented 4 years ago

建议通过规范nginx配置解决这个问题

It is suggested to adjust nginx configuration to solve this problem

在使用Kong,Apisix等支持根据动态路由转发流量时,不可避免的会接收到特别的host

sysulq commented 4 years ago

建议通过规范nginx配置解决这个问题 It is suggested to adjust nginx configuration to solve this problem

在使用Kong,Apisix等支持根据动态路由转发流量时,不可避免的会接收到特别的host

嗯,这个改进可以,欢迎提PR :)