Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why there are so many strange and false hosts which start with number in each metrics? #261

Open
huangyonghome opened this issue Feb 23, 2023 · 5 comments
Labels

Comments

@huangyonghome
Copy link

huangyonghome commented Feb 23, 2023

nginx conf:

http { vhost_traffic_status_filter_by_host on; vhost_traffic_status_zone shared:vhost_traffic_status:32m; }

server conf

server {
        listen 10011;
     #   allow 127.0.0.1;
      #  deny all;
        server_name localhost;
        location /nginx_status {
            vhost_traffic_status_display;
            vhost_traffic_status_display_format html;
        }
    }

start nginx-vts-exporter

nginx-vts-exporter -nginx.scrape_timeout 10 -nginx.scrape_uri http://127.0.0.1:10011/ngin_status/format/json

below is the monitor metrics

#abc.com is a false domain name,I hide the real one.

nginx_server_bytes{direction="in",host="0-9.abc.com"} 748
nginx_server_bytes{direction="in",host="0-api.abc.com"} 113 TYPE nginx_server_bytes counter
nginx_server_bytes{direction="in",host="${ip}"} 1155
nginx_server_bytes{direction="in",host="' *; host ceq67l6jndtcn5d40i907u4ksx66ipqku.oast.pro; '"} 178
nginx_server_bytes{direction="in",host="' *; host ceq67l6jndtcn5d40i907u8ok6dt7qgys.oast.pro; '"} 178
nginx_server_bytes{direction="in",host="' *; host ceq67l6jndtcn5d40i90dfuju1od83n9t.oast.pro; '"} 119
nginx_server_bytes{direction="in",host="' *; host ceq67l6jndtcn5d40i90nbe9ae463ecnc.oast.pro; '"} 178
nginx_server_bytes{direction="in",host="' *; host ceq67l6jndtcn5d40i90nxt7zyxi1mwue.oast.pro; '"} 119
nginx_server_bytes{direction="in",host="*"} 4.069418729738e+12
nginx_server_bytes{direction="in",host="0-0.abc.com"} 750
nginx_server_bytes{direction="in",host="0-3.abc.com"} 748
nginx_server_bytes{direction="in",host="0-8.abc.com"} 7490
nginx_server_bytes{direction="in",host="0-aptest.abc.com"} 759
nginx_server_bytes{direction="in",host="0-cp.abc.com"} 751
nginx_server_bytes{direction="in",host="0-dashboard.abc.com"} 765
nginx_server_bytes{direction="in",host="0-demo.abc.com"} 1132

Thanks you in advance.It will be appricated if anyone could help me

@u5surf
Copy link
Collaborator

u5surf commented Feb 23, 2023

@huangyonghome Hi, thanks reporting.
Umm….Do you have any other server which is provided by nginx?

@huangyonghome
Copy link
Author

@u5surf

Hi.Thanks for your reply..I tried two nginx servers.Both of them have the save problems

@u5surf
Copy link
Collaborator

u5surf commented Mar 11, 2023

@huangyonghome
Does your configuration’s server_name have some wildcard expression such as server_name ~^(.*)\.example\.com$ ;?
Anyway, we cannot reproduce your behavior anymore if you cannot give the minimal reproducible nginx.conf without you sensitive business data.

@huangyonghome
Copy link
Author

@u5surf
Yep.We have some wildcard server_name :

./conf_nwd/abc.conf: server_name *.abc.com;
./conf_nwd/nwd.com.conf: server_name *.nwd.net;
./conf_nwd/xyz.com.conf: server_name *.xyz.com;

@u5surf
Copy link
Collaborator

u5surf commented Mar 31, 2023

@huangyonghome
Can’t we consider that the request had come actually hostname which is consisted of the string which can be matched the wild card

In fact, 0-9.abc.com can match wildcard host name which you present.
Thus, we suggest that it should stop using the wildcard server name.

@u5surf u5surf added the question label Apr 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants