Update kubernetes sample config and readme
This commit is contained in:
parent
f79ba10ab3
commit
e6a87cd52e
|
@ -1,6 +1,10 @@
|
|||
# Kubernetes Input Plugin
|
||||
|
||||
This input plugin talks to the kubelet api using the `/stats/summary` and `/pods` endpoint to gather metrics about the running pods and containers for a single host. It is assumed that this plugin is running as part of a `daemonset` within a kubernetes installation. This means that telegraf is running on every node within the cluster. Therefore, you should configure this plugin to talk to its locally running kubelet.
|
||||
The Kubernetes plugin talks to the Kubelet API and gathers metrics about the
|
||||
running pods and containers for a single host. It is assumed that this plugin
|
||||
is running as part of a `daemonset` within a kubernetes installation. This
|
||||
means that telegraf is running on every node within the cluster. Therefore, you
|
||||
should configure this plugin to talk to its locally running kubelet.
|
||||
|
||||
To find the ip address of the host you are running on you can issue a command like the following:
|
||||
|
||||
|
@ -44,8 +48,8 @@ avoid cardinality issues:
|
|||
## OR
|
||||
# bearer_token_string = "abc_123"
|
||||
|
||||
# Labels to include and exclude
|
||||
# An empty array for include and exclude will include all labels
|
||||
## Pod labels to be added as tags. An empty array for both include and
|
||||
## exclude will include all labels.
|
||||
# label_include = []
|
||||
# label_exclude = ["*"]
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@ package kubernetes
|
|||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/influxdata/telegraf/filter"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/url"
|
||||
|
@ -11,6 +10,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/influxdata/telegraf"
|
||||
"github.com/influxdata/telegraf/filter"
|
||||
"github.com/influxdata/telegraf/internal"
|
||||
"github.com/influxdata/telegraf/internal/tls"
|
||||
"github.com/influxdata/telegraf/plugins/inputs"
|
||||
|
@ -48,8 +48,8 @@ var sampleConfig = `
|
|||
## OR
|
||||
# bearer_token_string = "abc_123"
|
||||
|
||||
# Labels to include and exclude
|
||||
# An empty array for include and exclude will include all labels
|
||||
## Pod labels to be added as tags. An empty array for both include and
|
||||
## exclude will include all labels.
|
||||
# label_include = []
|
||||
# label_exclude = ["*"]
|
||||
|
||||
|
|
Loading…
Reference in New Issue