Use Telegraf as value for graylog x-requested-by header

This commit is contained in:
Daniel Nelson 2018-11-28 16:52:40 -08:00
parent ba612b670b
commit fc7fba9020
No known key found for this signature in database
GPG Key ID: CAAD59C9444F6155
1 changed files with 1 additions and 1 deletions

View File

@ -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}