Skip to content

When '%' in my uri ,the marathon_exporter can't running. - #26

Open
sober-wang wants to merge 7 commits into
criteo:masterfrom
sober-wang:master
Open

When '%' in my uri ,the marathon_exporter can't running.#26
sober-wang wants to merge 7 commits into
criteo:masterfrom
sober-wang:master

Conversation

@sober-wang

Copy link
Copy Markdown

When '%' in my uri ,the marathon_exporter can't running.
So , I fix the bug.

Comment thread README.md Outdated
-marathon.uri string
URI of Marathon (default "http://marathon.mesos:8080")
Note: Supply HTTP Basic Auth (i.e. user:password@example.com)
If you URI inclube '%' ,you should used marathon.username and marathon.password

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Typo fixes: "if your URI include '%', you should use...."

Also, about your PR, you have the issue when you have % in your password for instance right?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I'm fix it.

Comment thread README.md Outdated
-marathon.username string
marathon author username ,(default "")
-marathon.password string
marathon author password ,(default "")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please remove both unnecessary ','
Also, change 'author' -> 'user' to be clearer for the user.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I'm fix it.

Comment thread go.mod Outdated
@@ -0,0 +1,19 @@
module marathon_exporter

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you propose a different PR to switch to go modules please?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I just remove go modules.

Comment thread scraper.go Outdated
}

response, err := client.Get(fmt.Sprintf("%v/%s", s.uri, path))
//response, err := client.Get(fmt.Sprintf("%v/%s", s.uri, path))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

you can remove the comment if we don't use it anymore

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I just remove the comment.

Comment thread main.go Outdated
config.HTTPBasicAuthUser = uri.User.Username()
}
}
config.HTTPBasicAuthUser = *marathonUserName

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

So, user is not able to specify its marathon user and password in the URL anymore? It would be ncie to be able to do both for retro compatibility

@Lqp1

Lqp1 commented Sep 25, 2020

Copy link
Copy Markdown
Contributor

I tested with your branch, and even with your last commits, the scrapper does not authenticate properly when using the user/pass provided in the URI and can't fetch all metrics.
You can have a look at this PR, someone already did something similar: #16
Also, note that with fairly recent version of marathon, there's already a prometheus exporter and this node might not be needed anymore: https://mesosphere.github.io/marathon/docs/metrics.html

@sober-wang

Copy link
Copy Markdown
Author

I tested with your branch, and even with your last commits, the scrapper does not authenticate properly when using the user/pass provided in the URI and can't fetch all metrics.
You can have a look at this PR, someone already did something similar: #16
Also, note that with fairly recent version of marathon, there's already a prometheus exporter and this node might not be needed anymore: https://mesosphere.github.io/marathon/docs/metrics.html

oh, I used marathon v1.14.x ,it not have prometheus exporter URL path.
Are you build code's ?
I can run the binary file.

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