-
Notifications
You must be signed in to change notification settings - Fork 27
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
When '%' in my uri ,the marathon_exporter can't running. #26
base: master
Are you sure you want to change the base?
Conversation
README.md
Outdated
@@ -36,6 +36,11 @@ Usage of marathon_exporter: | |||
-marathon.uri string | |||
URI of Marathon (default "http://marathon.mesos:8080") | |||
Note: Supply HTTP Basic Auth (i.e. user:[email protected]) | |||
If you URI inclube '%' ,you should used marathon.username and marathon.password |
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.
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?
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.
I'm fix it.
README.md
Outdated
-marathon.username string | ||
marathon author username ,(default "") | ||
-marathon.password string | ||
marathon author password ,(default "") |
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.
Please remove both unnecessary ','
Also, change 'author' -> 'user' to be clearer for the user.
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.
I'm fix it.
go.mod
Outdated
@@ -0,0 +1,19 @@ | |||
module marathon_exporter |
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.
Can you propose a different PR to switch to go modules please?
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.
I just remove go modules.
scraper.go
Outdated
@@ -31,11 +31,17 @@ func (s *scraper) Scrape(path string) ([]byte, error) { | |||
}, | |||
} | |||
|
|||
response, err := client.Get(fmt.Sprintf("%v/%s", s.uri, path)) | |||
//response, err := client.Get(fmt.Sprintf("%v/%s", s.uri, path)) |
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.
you can remove the comment if we don't use it anymore
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.
I just remove the comment.
main.go
Outdated
config.HTTPBasicAuthUser = uri.User.Username() | ||
} | ||
} | ||
config.HTTPBasicAuthUser = *marathonUserName |
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.
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
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. |
oh, I used marathon v1.14.x ,it not have prometheus exporter URL path. |
When '%' in my uri ,the marathon_exporter can't running.
So , I fix the bug.