From 5f06bd2566175eb1acdb4199109c260a22d3489d Mon Sep 17 00:00:00 2001 From: Cameron Sparr Date: Tue, 13 Dec 2016 16:10:59 +0000 Subject: [PATCH] Graylog output should set short_message field closes #2045 --- CHANGELOG.md | 1 + plugins/outputs/graylog/README.md | 2 +- plugins/outputs/graylog/graylog.go | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 36e7ea73e..d23402afd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ - [#1843](https://github.com/influxdata/telegraf/pull/1843) & [#1668](https://github.com/influxdata/telegraf/issues/1668): Add optional ability to define PID as a tag. - [#1730](https://github.com/influxdata/telegraf/issues/1730): Fix win_perf_counters not gathering non-English counters. - [#2061](https://github.com/influxdata/telegraf/issues/2061): Fix panic when file stat info cannot be collected due to permissions or other issue(s). +- [#2045](https://github.com/influxdata/telegraf/issues/2045): Graylog output should set short_message field. ## v1.1.2 [2016-12-12] diff --git a/plugins/outputs/graylog/README.md b/plugins/outputs/graylog/README.md index 833482047..39863b541 100644 --- a/plugins/outputs/graylog/README.md +++ b/plugins/outputs/graylog/README.md @@ -9,6 +9,6 @@ It requires a `servers` name. ```toml # Send telegraf metrics to graylog(s) [[outputs.graylog]] - ## Udp endpoint for your graylog instance. + ## UDP endpoint for your graylog instance(s). servers = ["127.0.0.1:12201", "192.168.1.1:12201"] ``` diff --git a/plugins/outputs/graylog/graylog.go b/plugins/outputs/graylog/graylog.go index 64624bcb4..e77eae558 100644 --- a/plugins/outputs/graylog/graylog.go +++ b/plugins/outputs/graylog/graylog.go @@ -154,7 +154,7 @@ type Graylog struct { } var sampleConfig = ` - ## Udp endpoint for your graylog instance. + ## UDP endpoint for your graylog instance. servers = ["127.0.0.1:12201", "192.168.1.1:12201"] ` @@ -213,7 +213,7 @@ func serialize(metric telegraf.Metric) ([]string, error) { m := make(map[string]interface{}) m["version"] = "1.1" m["timestamp"] = metric.UnixNano() / 1000000000 - m["short_message"] = " " + m["short_message"] = "telegraf" m["name"] = metric.Name() if host, ok := metric.Tags()["host"]; ok {