Skip to content
Fluentd input plugin which queries Kubernetes kubelet summary API to collect Kubernetes metrics.
Branch: develop
Clone or download
chaitanyaphalak Update metrics-information.md (#44)
Update metrics-information.md
Latest commit 8a831de Jun 17, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
.github Separating out CLA and adding PR template May 31, 2019
docker Added release workflow (#34) Mar 6, 2019
examples Added Dockerfile and an example for deploying as a daemonset. Sep 21, 2018
lib/fluent/plugin SII-4119: Set default kubelet_address to "#{ENV['KUBERNETES_NODE_IP']}" Jun 3, 2019
test SII patch fix unit tests Jun 5, 2019
.gitignore Increasing 3rd party library levels, updated project maintainers Nov 13, 2018
CLA.md Separating out CLA and adding PR template May 31, 2019
CONTRIBUTING.md Initial implementation. Sep 10, 2018
CONTRIBUTORS.md Initial implementation. Sep 10, 2018
Gemfile Version and linting fixes Feb 28, 2019
Gemfile.lock Combined doc updates (#42) Mar 6, 2019
LICENSE doc and licence updates (#35) Mar 6, 2019
README.md SII-4119: Set default kubelet_address to "#{ENV['KUBERNETES_NODE_IP']}" Jun 3, 2019
Rakefile Version and linting fixes Feb 28, 2019
VERSION metrics 1.1.1 release prep Jun 10, 2019
fluent-plugin-kubernetes-metrics.gemspec Combined doc updates (#42) Mar 6, 2019
metrics-information.md Merge branch 'develop' into jenworthington-patch-5 Jun 17, 2019

README.md

CircleCI

Fluentd Plugin for Kubernetes Metrics

The Fluentd input plugin collects Kubernetes cluster metrics which are exposed by the Kubelet API and forwards them to fluentd. The plugin collects metrics from:

  • The kubelet summary API
  • The kubelet stats API
  • The cAdvisor metrics API

The Fluentd input plugin can be configured to fetch metrics from the Kubernetes API server or from the Kubelet. For more details on the specific metrics that are collected and aggregated with this plugin, please refer to the metrics information document.

Installation

See: Plugin Management.

RubyGems

$ gem install fluent-plugin-kubernetes-metrics

Bundler

Add the following line to your Gemfile:

gem "fluent-plugin-kubernetes-metrics"

Then execute:

$ bundle

Plugin helpers

Fluent::Plugin::KubernetesMetricsInput

tag (string) (optional)

The tag for the event.

Default value: kubernetes.metrics.*.

interval (time) (optional)

How often the plugin should pull metrcs.

Default value: 15s.

kubeconfig (string) (optional)

Path to a kubeconfig file that points to a cluster from which the plugin should collect metrics. Mostly useful when running fluentd outside of the cluster. When kubeconfig is set, kubernetes_url, client_cert, client_key, ca_file, insecure_ssl, bearer_token_file, and secret_dir are ignored.

kubernetes_url (string) (optional)

URL of the kubernetes API server.

client_cert (string) (optional)

Path to the certificate file for this client.

client_key (string) (optional)

Path to the private key file for this client.

ca_file (string) (optional)

Path to the CA file.

insecure_ssl (bool) (optional)

If insecure_ssl is set to true, apiserver's certificate is not verified.

bearer_token_file (string) (optional)

Path to the file that contains the API token. The default value is the file "token" in secret_dir.

secret_dir (string) (optional)

Path of the location where the pod's service account credentials are stored.

Default value: /var/run/secrets/kubernetes.io/serviceaccount.

node_name (string) (required)

The name of the node from which the plugin should collect metrics. This enables the plugin to fetch metrics from a kubelet API. Used only when the use_rest_client configuration parameter is enabled.

node_names Array(string) (required)

Array of the nodes from which the this plugin should collect metrics. This enables the plugin to fetch metrics from kubeapiserver. Used only when use_rest_client configuration parameter is not enabled.

kubelet_address (string) (optional)

The hostname or IP address that kubelet will use to connect to. If not supplied, status.hostIP of the node is used to fetch metrics from the Kubelet API (via the $KUBERNETES_NODE_IP environment variable).

Default value: "#{ENV['KUBERNETES_NODE_IP']}".

kubelet_port (integer) (optional)

The port that kubelet is listening on.

Default value: 10250.

use_rest_client (bool) (optional)

Enable to use the rest client to get the metrics from summary api on each kubelet.

Default value: true.

use_rest_client_ssl (bool) (optional)

Enable to use SSL for rest client.

Default value: true.

License

See License.

You can’t perform that action at this time.