Use Telegraf as value for graylog x-requested-by header
This commit is contained in:
parent
ba612b670b
commit
fc7fba9020
|
@ -236,7 +236,7 @@ func (h *GrayLog) sendRequest(serverURL string) (string, float64, error) {
|
||||||
return "", -1, fmt.Errorf("Invalid server URL \"%s\"", serverURL)
|
return "", -1, fmt.Errorf("Invalid server URL \"%s\"", serverURL)
|
||||||
}
|
}
|
||||||
// Add X-Requested-By header
|
// Add X-Requested-By header
|
||||||
headers["X-Requested-By"] = requestURL.Hostname()
|
headers["X-Requested-By"] = "Telegraf"
|
||||||
|
|
||||||
if strings.Contains(requestURL.String(), "multiple") {
|
if strings.Contains(requestURL.String(), "multiple") {
|
||||||
m := &Messagebody{Metrics: h.Metrics}
|
m := &Messagebody{Metrics: h.Metrics}
|
||||||
|
|
Loading…
Reference in New Issue