@@ -123,7 +123,7 @@ var sampleConfig = `
123123 ## Whether to report for each container per-device blkio (8:0, 8:1...),
124124 ## network (eth0, eth1, ...) and cpu (cpu0, cpu1, ...) stats or not.
125125 ## Usage of this setting is discouraged since it will be deprecated in favor of 'perdevice_include'.
126- ## Default value is 'true' for backwards compatibility, please set it to 'false' so that 'perdevice_include' setting
126+ ## Default value is 'true' for backwards compatibility, please set it to 'false' so that 'perdevice_include' setting
127127 ## is honored.
128128 perdevice = true
129129
@@ -134,12 +134,12 @@ var sampleConfig = `
134134
135135 ## Whether to report for each container total blkio and network stats or not.
136136 ## Usage of this setting is discouraged since it will be deprecated in favor of 'total_include'.
137- ## Default value is 'false' for backwards compatibility, please set it to 'true' so that 'total_include' setting
137+ ## Default value is 'false' for backwards compatibility, please set it to 'true' so that 'total_include' setting
138138 ## is honored.
139139 total = false
140140
141141 ## Specifies for which classes a total metric should be issued. Total is an aggregated of the 'perdevice' values.
142- ## Possible values are 'cpu', 'blkio' and 'network'
142+ ## Possible values are 'cpu', 'blkio' and 'network'
143143 ## Total 'cpu' is reported directly by Docker daemon, and 'network' and 'blkio' totals are aggregated by this plugin.
144144 ## Please note that this setting has no effect if 'total' is set to 'false'
145145 # total_include = ["cpu", "blkio", "network"]
@@ -213,6 +213,9 @@ func (d *Docker) Gather(acc telegraf.Accumulator) error {
213213 d .client = c
214214 }
215215
216+ // Close any idle connections in the end of gathering
217+ defer d .client .Close ()
218+
216219 // Create label filters if not already created
217220 if ! d .filtersCreated {
218221 err := d .createLabelFilters ()
0 commit comments