Update kubernetes sample config and readme

This commit is contained in:
Daniel Nelson 2019-12-12 15:01:50 -08:00
parent f79ba10ab3
commit e6a87cd52e
No known key found for this signature in database
GPG Key ID: CAAD59C9444F6155
2 changed files with 10 additions and 6 deletions

View File

@ -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 = ["*"]

View File

@ -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 = ["*"]