From c4cfdb8a25cc99f444f055cb9c68b7fe1310e116 Mon Sep 17 00:00:00 2001 From: Cameron Sparr Date: Tue, 31 May 2016 16:42:07 +0100 Subject: [PATCH] Revert "Revert graylog output" This reverts commit 4f27315720b443671937a8dbd16cf4feb0a5c388. --- README.md | 1 + etc/telegraf.conf | 6 ++++++ plugins/outputs/graylog/README.md | 9 +++++++++ plugins/outputs/graylog/graylog_test.go | 1 - 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7366d5986..7890fa113 100644 --- a/README.md +++ b/README.md @@ -233,6 +233,7 @@ want to add support for another service or third-party API. * [datadog](https://github.com/influxdata/telegraf/tree/master/plugins/outputs/datadog) * [file](https://github.com/influxdata/telegraf/tree/master/plugins/outputs/file) * [graphite](https://github.com/influxdata/telegraf/tree/master/plugins/outputs/graphite) +* [graylog](https://github.com/influxdata/telegraf/tree/master/plugins/outputs/graylog) * [instrumental](https://github.com/influxdata/telegraf/tree/master/plugins/outputs/instrumental) * [kafka](https://github.com/influxdata/telegraf/tree/master/plugins/outputs/kafka) * [librato](https://github.com/influxdata/telegraf/tree/master/plugins/outputs/librato) diff --git a/etc/telegraf.conf b/etc/telegraf.conf index d8fe3b865..e1ae2cdd7 100644 --- a/etc/telegraf.conf +++ b/etc/telegraf.conf @@ -205,6 +205,12 @@ # timeout = 2 +# # Send telegraf metrics to graylog(s) +# [[outputs.graylog]] +# ## Udp endpoint for your graylog instance. +# servers = ["127.0.0.1:12201", "192.168.1.1:12201"] + + # # Configuration for sending metrics to an Instrumental project # [[outputs.instrumental]] # ## Project API Token (required) diff --git a/plugins/outputs/graylog/README.md b/plugins/outputs/graylog/README.md index 26b8d8fc6..833482047 100644 --- a/plugins/outputs/graylog/README.md +++ b/plugins/outputs/graylog/README.md @@ -3,3 +3,12 @@ This plugin writes to a Graylog instance using the "gelf" format. It requires a `servers` name. + +### Configuration: + +```toml +# Send telegraf metrics to graylog(s) +[[outputs.graylog]] + ## Udp endpoint for your graylog instance. + servers = ["127.0.0.1:12201", "192.168.1.1:12201"] +``` diff --git a/plugins/outputs/graylog/graylog_test.go b/plugins/outputs/graylog/graylog_test.go index 521f83dc1..fd8a418f4 100644 --- a/plugins/outputs/graylog/graylog_test.go +++ b/plugins/outputs/graylog/graylog_test.go @@ -24,7 +24,6 @@ func TestWrite(t *testing.T) { i.Connect() metrics := testutil.MockMetrics() - metrics = append(metrics, testutil.TestMetric(int64(1234567890))) i.Write(metrics)