-
Notifications
You must be signed in to change notification settings - Fork 135
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
Make listen interface of exporters configurable #2495
Make listen interface of exporters configurable #2495
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vishwas-sharma2480 Please read contribution guideline, it highlights how to setup local environment, build project run test, etc...
Also can you please avoid commits from CodeSee
bot in your PRs. Our CLA checker requires every author in a PR to sign agreement and this bot can't do it.
params, err := nodeExporterConfig(node, row, pmmAgentVersion) | ||
//params, err := nodeExporterConfig(node, row, pmmAgentVersion) | ||
listenInterface := "127.0.0.1" // Change this to the desired IP address or interface | ||
params, err := nodeExporterConfig(node, exporter, agentVersion, listenInterface) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is invalid (uncompilable). It should be row
instead of exporter
and pmmAgnetVersion
instead of agentVersion
.
"--web.listen-address=:" + tdp.Left + " .listen_port " + tdp.Right, | ||
} | ||
// "--web.listen-address=:" + tdp.Left + " .listen_port " + tdp.Right, | ||
"--web.listen-address=" + listenInterface + ":" + tdp.Left + " .listen_port " + tdp.Right, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be declared here as placeholder, same as .listen_port
. And then you pmm-agent should fill it with proper interface. Otherwise it will be the same interface for all nodes.
Please note that CodeSee is not able to sign the Contributor agreement, which is why we won't be technically in a position to merge such PRs. This repository is open source, and we request all committers to sign the Contributor's License Agreement (CLA). Therefore, what we can suggest is re-create this PR by making sure all contributors can sign the CLA. |
Hi @vishwas-sharma2480, Thanks a lot for your contribution. If the goal here is to be able to restrict node exporter to 127.0.0.1, we are also working on the issue as well and you can follow the ticket at PMM-12422. |
PR Summary:
This pull request aims to enhance the nodeExporterConfig function to allow configuration of the listen interface for the node_exporter in the [your_project_name] codebase.
Changes Made
Modified the nodeExporterConfig function to accept a listenInterface parameter.
Updated the --web.listen-address argument to include the specified listen interface.
Provided a placeholder for the listenInterface parameter in function calls.
Incomplete Implementation
This change is still incomplete and requires further guidance on how to obtain the listenInterface value from the user or configuration. Currently, the listenInterface is a placeholder that needs to be replaced with the actual method of obtaining this value.
TODO:
Define how the listenInterface should be obtained (e.g., from user input, configuration file, or environment variable).
Implement the logic to retrieve the listenInterface value and pass it to the nodeExporterConfig function.