fix stats url for csv

stats  url for csv miss rawquery
This commit is contained in:
axingblog 2015-11-08 11:54:00 +08:00
parent 00614026b3
commit 974db063c2
1 changed files with 1 additions and 1 deletions

View File

@ -137,7 +137,7 @@ func (g *haproxy) gatherServer(addr string, acc plugins.Accumulator) error {
return fmt.Errorf("Unable parse server address '%s': %s", addr, err)
}
req, err := http.NewRequest("GET", fmt.Sprintf("%s://%s%s/;csv", u.Scheme, u.Host, u.Path), nil)
req, err := http.NewRequest("GET", fmt.Sprintf("%s://%s%s?%s;csv", u.Scheme, u.Host, u.Path, u.RawQuery), nil)
if u.User != nil {
p, _ := u.User.Password()
req.SetBasicAuth(u.User.Username(), p)