A long-lived project that still receives updates
A fluentd input plugin that collects node and container metrics from a kubernetes cluster via kubeapiserver API.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.0
~> 13.0
~> 0.16.1
~> 3.3.0
~> 3.5.1

Runtime

>= 1.9.1
~> 1.14.1
~> 3.10.2
~> 4.9.3
 Project Readme

End of Support

Important: The fluent-plugin-k8s-metrics-agg will reach End of Support on January 1, 2024. After that date, this repository will no longer receive updates from Splunk and will no longer be supported by Splunk. Until then, only critical security fixes and bug fixes will be provided.

Fluentd Plugin for Kubernetes Metrics - Aggregator

Fluentd input plugin collects kubernetes cluster metrics from the kubeapiserver API. The API is exposed by KubeApiServer on a kubernetes cluster.

Installation

See also: Plugin Management.

RubyGems

$ gem install fluent-plugin-k8s-metrics-agg

Bundler

Add following line to your Gemfile:

gem "fluent-plugin-k8s-metrics-agg"

And then execute:

$ bundle

Plugin helpers

Fluent::Plugin::KubernetesMetricsAggregatorInput

tag (string) (optional)

The event tag.

Default value: kubernetes.metrics.*.

interval (time) (optional)

How often the plugin pulls metrcs.

Default value: 15s.

kubeconfig (string) (optional)

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

client_cert (string) (optional)

The path to the certificate file for this client.

client_key (string) (optional)

The path to the private key file for this client.

ca_file (string) (optional)

The path to the CA file.

insecure_ssl (bool) (optional)

When insecure_ssl is set to true, the plugin does not verify the apiserver's certificate.

bearer_token_file (string) (optional)

The path to the file contains the API token. By default the plugin reads from the file "token" in the secret_dir.

secret_dir (string) (optional)

The path to the location of the pod's service account credentials.

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

kubelet_port (integer) (optional)

The port that the kubelet is listening to.

Default value: 10255.

cluster_name (string) (optional)

The name of the cluster where the plugin is deployed.

Default value: cluster_name.

License

See License.