diff --git a/plugins/inputs/graylog/graylog.go b/plugins/inputs/graylog/graylog.go index 8e580480d844b..6e75f676a97b8 100644 --- a/plugins/inputs/graylog/graylog.go +++ b/plugins/inputs/graylog/graylog.go @@ -235,6 +235,9 @@ func (h *GrayLog) sendRequest(serverURL string) (string, float64, error) { if err != nil { return "", -1, fmt.Errorf("Invalid server URL \"%s\"", serverURL) } + // Add X-Requested-By header + headers["X-Requested-By"] = requestURL.Hostname() + if strings.Contains(requestURL.String(), "multiple") { m := &Messagebody{Metrics: h.Metrics} http_body, err := json.Marshal(m)