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

http without hostname got no nginx_ingress_controller_requests metrics. #4657

Closed
nobody4t opened this issue Oct 10, 2019 · 5 comments
Closed

Comments

@nobody4t
Copy link

Maybe a bug or desired. Please verify this.

NGINX Ingress controller version:

0.23
Kubernetes version (use kubectl version):

Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.0", GitCommit:"641856db18352033a0d96dbc99153fa3b27298e5", GitTreeState:"clean", BuildDate:"2019-03-25T15:53:57Z", GoVersion:"go1.12.1", Compiler:"gc", Platform:"linux/amd64"}

Server Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.5+icp-ee", GitCommit:"eb4df6c6fb47f5b4fd1ed8bfbfe2d0ed5ea636e1", GitTreeState:"clean", BuildDate:"2019-05-08T02:18:32Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"linux/amd64"}
Environment:

  • Cloud provider or hardware configuration:

  • OS (e.g. from /etc/os-release):
    Ubuntu 18.04

  • Kernel (e.g. uname -a):
    4.15.0-47-generic Ingress only exposes internal node ip #50-Ubuntu SMP x86_64

  • Install tools:

  • Others:
    What happened:
    I deployed an app with ingress configured.
    It does not have hostname in the ingress and no tls.
    When I visited the link, I can not get the nginx_ingress_controller_requests metrics in prometheus. The in the grafana dashboard there is no metrics.

But when I configured tls with hostname or add a hostname to the http config. Visit it again with curl, the metrics came back.

What you expected to happen:

With or without hostname for http config will produce metrics all the same.

How to reproduce it (as minimally and precisely as possible):
Just read above.

Anything else we need to know:

@nobody4t
Copy link
Author

nobody4t commented Oct 10, 2019

Also, I verified that tls without hostname will also have no this metrics.
Is this desired ? How does this controller collect metrics?

Just want to know the puzzle. Any comments will be appreciated.

@nobody4t
Copy link
Author

I found this https://github.com/kubernetes/ingress-nginx/blob/master/internal/ingress/metric/collectors/controller.go#L243
As the comments says, the metrics will be deleted if the host is not available. Does that mean, if no hosts defined the metrics will be dropped?

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 8, 2020
@frittentheke
Copy link

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 14, 2020
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 13, 2020
@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants