From 78cf0b7ea69602b5825c8a33737c9d99fe971d32 Mon Sep 17 00:00:00 2001 From: Steven Soroka Date: Fri, 16 Oct 2020 13:07:29 -0400 Subject: [PATCH] turn gzip on by default for InfluxDB v1 output (#8269) --- plugins/outputs/influxdb/README.md | 2 +- plugins/outputs/influxdb/influxdb.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/outputs/influxdb/README.md b/plugins/outputs/influxdb/README.md index aefc03690..cd1b36a72 100644 --- a/plugins/outputs/influxdb/README.md +++ b/plugins/outputs/influxdb/README.md @@ -75,7 +75,7 @@ The InfluxDB output plugin writes metrics to the [InfluxDB v1.x] HTTP or UDP ser ## HTTP Content-Encoding for write request body, can be set to "gzip" to ## compress body or "identity" to apply no encoding. - # content_encoding = "identity" + # content_encoding = "gzip" ## When true, Telegraf will output unsigned integers as unsigned values, ## i.e.: "42u". You will need a version of InfluxDB supporting unsigned diff --git a/plugins/outputs/influxdb/influxdb.go b/plugins/outputs/influxdb/influxdb.go index 68e8c93ac..49ca7d643 100644 --- a/plugins/outputs/influxdb/influxdb.go +++ b/plugins/outputs/influxdb/influxdb.go @@ -131,7 +131,7 @@ var sampleConfig = ` ## HTTP Content-Encoding for write request body, can be set to "gzip" to ## compress body or "identity" to apply no encoding. - # content_encoding = "identity" + # content_encoding = "gzip" ## When true, Telegraf will output unsigned integers as unsigned values, ## i.e.: "42u". You will need a version of InfluxDB supporting unsigned @@ -315,6 +315,7 @@ func init() { CreateUDPClientF: func(config *UDPConfig) (Client, error) { return NewUDPClient(*config) }, + ContentEncoding: "gzip", } }) }