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

feat: allow to specify dial interface #1622

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ricardomaraschini
Copy link
Member

@ricardomaraschini ricardomaraschini commented Sep 24, 2024

Description, Motivation and Context

by default the tcp port status collector listen on all interfaces but selects the first interface found to issue the request. this commit makes the collector to accept an interface to which it should call.

for example:

  collectors:
  - tcpPortStatus:
      collectorName: test
      port: 10248
      dialInterface: lo

this definition will make the collector listen on all interface but call 127.0.0.1:10248 to test. other example could be:

  collectors:
  - tcpPortStatus:
      collectorName: test
      port: 10248
      dialInterface: eth0

this again will make the collector listen in all interfaces but it will use the ip found on eth0 to issue the call.

Checklist

  • New and existing tests pass locally with introduced changes.
  • Tests for the changes have been added (for bug fixes / features)
  • The commit message(s) are informative and highlight any breaking changes
  • Any documentation required has been added/updated. For changes to https://troubleshoot.sh/ create a PR here

Does this PR introduce a breaking change?

  • Yes
  • No

by default the tcp port status collector listen on all interfaces but
selects the first interface found to issue the request. this commit
makes the collector to accept an interface to which we want to call.

for example:

```yaml
  collectors:
  - tcpPortStatus:
      collectorName: test
      port: 10248
      dialInterface: lo
```

this definition will make the collector listen on all interface but call
127.0.0.1:10248 to test. other example could be:

```yaml
  collectors:
  - tcpPortStatus:
      collectorName: test
      port: 10248
      dialInterface: eth0
```

this again will make the collector listen in all interfaces but it will
use the ip found on eth0 to issue the call.
@ricardomaraschini ricardomaraschini added the type::feature New feature or request label Sep 24, 2024
@ricardomaraschini ricardomaraschini requested a review from a team as a code owner September 24, 2024 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type::feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant