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

fix: use ipv4 port #93

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

Conversation

rohankmr414
Copy link

@rohankmr414 rohankmr414 commented Sep 21, 2023

By default it writes the ipv6 port and ipv4 address to the service discovery output file, with this patch the ipv4 port will be written

@@ -245,7 +245,7 @@ func (t *AugmentedTask) ExporterInformation() []*PrometheusTaskInfo {

if len(i.NetworkBindings) > 0 {
for _, nb := range i.NetworkBindings {
if int(*nb.ContainerPort) == exporterPort {
if int(*nb.ContainerPort) == exporterPort && *nb.BindIP == "0.0.0.0" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This excludes all other bind IPs that aren't 0.0.0.0 but are IPv4.

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

Successfully merging this pull request may close these issues.

2 participants