Minor refactoring
This commit is contained in:
parent
b3ddde5a6f
commit
5bd8572b56
|
@ -20,7 +20,7 @@ for the stat structure can be found
|
||||||
# To use TCP, set endpoint = "tcp://[ip]:[port]"
|
# To use TCP, set endpoint = "tcp://[ip]:[port]"
|
||||||
# To use environment variables (ie, docker-machine), set endpoint = "ENV"
|
# To use environment variables (ie, docker-machine), set endpoint = "ENV"
|
||||||
endpoint = "unix:///var/run/docker.sock"
|
endpoint = "unix:///var/run/docker.sock"
|
||||||
# To collect metrics from TLS-enabled daemon
|
# To collect metrics from a TLS-enabled daemon
|
||||||
# tls_enabled = true
|
# tls_enabled = true
|
||||||
# tls_ca = "~/certificates_path/ca.pem"
|
# tls_ca = "~/certificates_path/ca.pem"
|
||||||
# tls_cert = "~/certificates_path/cert.pem"
|
# tls_cert = "~/certificates_path/cert.pem"
|
||||||
|
|
|
@ -2,6 +2,7 @@ package system
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
"regexp"
|
"regexp"
|
||||||
|
@ -14,7 +15,6 @@ import (
|
||||||
"github.com/influxdata/telegraf/plugins/inputs"
|
"github.com/influxdata/telegraf/plugins/inputs"
|
||||||
|
|
||||||
"github.com/fsouza/go-dockerclient"
|
"github.com/fsouza/go-dockerclient"
|
||||||
"errors"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type Docker struct {
|
type Docker struct {
|
||||||
|
@ -58,7 +58,7 @@ var sampleConfig = `
|
||||||
## To use TCP, set endpoint = "tcp://[ip]:[port]"
|
## To use TCP, set endpoint = "tcp://[ip]:[port]"
|
||||||
## To use environment variables (ie, docker-machine), set endpoint = "ENV"
|
## To use environment variables (ie, docker-machine), set endpoint = "ENV"
|
||||||
endpoint = "unix:///var/run/docker.sock"
|
endpoint = "unix:///var/run/docker.sock"
|
||||||
## To collect metrics from TLS-enabled daemon
|
## To collect metrics from a TLS-enabled daemon
|
||||||
# tls_enabled = true
|
# tls_enabled = true
|
||||||
# tls_ca = "~/certificates_path/ca.pem"
|
# tls_ca = "~/certificates_path/ca.pem"
|
||||||
# tls_cert = "~/certificates_path/cert.pem"
|
# tls_cert = "~/certificates_path/cert.pem"
|
||||||
|
|
Loading…
Reference in New Issue