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

metrics-hijacker should scrape app metrics on localhost #5053

Closed
lahabana opened this issue Sep 23, 2022 · 6 comments · Fixed by #5326
Closed

metrics-hijacker should scrape app metrics on localhost #5053

lahabana opened this issue Sep 23, 2022 · 6 comments · Fixed by #5326
Assignees
Labels
area/observability kind/bug A bug triage/accepted The issue was reviewed and is complete enough to start working on it

Comments

@lahabana
Copy link
Contributor

What happened?

2022-09-23T11:23:05.035Z	ERROR	metrics-hijacker	failed call	{"name": "application", "path": "/metrics", "port": 5000, "error": "Get \"http://10.42.0.17:5000/metrics\": dial tcp 127.0.0.6:0->10.42.0.17:5000: connect: connection refused"}

This enables folks to bind their "troubleshooting" listener to localhost only and increase their security.

@lahabana lahabana added area/observability triage/pending This issue will be looked at on the next triage meeting kind/bug A bug labels Sep 23, 2022
@jakubdyszkiewicz
Copy link
Contributor

Triage: so the app listener is on "public IP", but the metrics listener is on localhost?

@jakubdyszkiewicz jakubdyszkiewicz added triage/accepted The issue was reviewed and is complete enough to start working on it and removed triage/pending This issue will be looked at on the next triage meeting labels Sep 26, 2022
@lahabana
Copy link
Contributor Author

lahabana commented Sep 26, 2022

I need to double check this because I think I was maybe wrong.

I think you can force it by setting "address" my gut feeling is that this should be the default.

@lahabana lahabana added triage/needs-reproducing Someone else should try to reproduce this and removed triage/accepted The issue was reviewed and is complete enough to start working on it labels Sep 26, 2022
@jakubdyszkiewicz
Copy link
Contributor

Before we start reproducing this.

This enables folks to bind their "troubleshooting" listener to localhost only and increase their security

But they can't with transparent proxy. We recently fixed the behavior that you cannot bind the app to localhost and use a transparent proxy.

@jakubdyszkiewicz jakubdyszkiewicz added triage/pending This issue will be looked at on the next triage meeting and removed triage/needs-reproducing Someone else should try to reproduce this labels Oct 12, 2022
@lahabana
Copy link
Contributor Author

But this is the "troubleshooting" listener right? It's separate from the actual app listener no?

@jakubdyszkiewicz
Copy link
Contributor

Triage: we want to keep it as is for now. For the majority of cases, the metrics listener is public. If needed, we can reopen.
The only case that this would be useful is if you expose metrics and other important endpoints like heap dump on the same listener and you want to hide it.

@jakubdyszkiewicz jakubdyszkiewicz closed this as not planned Won't fix, can't repro, duplicate, stale Oct 24, 2022
@jakubdyszkiewicz jakubdyszkiewicz added triage/rotten closed due to lack of information for too long, rejected feature... and removed triage/pending This issue will be looked at on the next triage meeting labels Oct 24, 2022
@lukidzi
Copy link
Contributor

lukidzi commented Nov 10, 2022

Looks like there might be a use case to create hijacking metrics from applications binding to localhost. We should implement this.

@lukidzi lukidzi reopened this Nov 10, 2022
@github-actions github-actions bot added the triage/pending This issue will be looked at on the next triage meeting label Nov 10, 2022
@lukidzi lukidzi added triage/accepted The issue was reviewed and is complete enough to start working on it and removed triage/pending This issue will be looked at on the next triage meeting triage/rotten closed due to lack of information for too long, rejected feature... labels Nov 10, 2022
@lukidzi lukidzi self-assigned this Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/observability kind/bug A bug triage/accepted The issue was reviewed and is complete enough to start working on it
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants