-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Prometheus Metric Hostnames could lead to DoS conditions? #3116
Comments
@WillPlatnick could this be related to the fact that To get around this we use
|
No, I mean this. blackbiz.ws isn't us, someone just tried to access our ingress controller using that hostname. nginx-ingress creates 65 unique metrics everytime a new hostname gets used. If they use HEAD, POST, OPTIONS, for the request it will generate even more.
|
@WillPlatnick thank you for the report. To answer your question, yes the ingress controller doesn't filter the traffic stats we send to prometheus. Same thing for the logs in nginx. |
@WillPlatnick while #3118 is merged and 0.20 is released, you can use |
Also, the histograms for the bytes-based metrics do not make sense. That would reduce this problem by 2/3. |
@towolf thank you for your feedback. Providing metrics for something generic like the ingress controller is one of those situations where we can say one size fits all is hard. |
Is this a request for help? (If yes, you should use our troubleshooting guide and community support channels, see https://kubernetes.io/docs/tasks/debug-application-cluster/troubleshooting/.):
No
What keywords did you search in NGINX Ingress controller issues before filing this one? (If you have found any duplicates, you should instead reply there.):
metrics
Is this a BUG REPORT or FEATURE REQUEST? (choose one):
Hello,
In looking at my prometheus metrics, I currently have over 100,000. The reason for this is because of security scans that are hitting my servers with hostnames other than ones I have set in my ingress, which creates brand new sets of metrics that we don't care about.
This behavior is filling up my Prometheus server at an increasing rate because of junk data, and is causing my 3rd party scraper (datadog) to have issues scraping because there's so many metrics. I'm also wondering if this behavior could potentially be used to create a Denial of Service condition in either the ingress controller or prometheus installs that scrape controllers.
We have a source of truth about what hostnames we care about in our ingress declarations. Perhaps we should limit hostnames in metrics to those to make sure we don't get junk data?
The text was updated successfully, but these errors were encountered: