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.
See: Plugin Management.
$ gem install fluent-plugin-kubernetes-metrics
Add the following line to your Gemfile:
gem "fluent-plugin-kubernetes-metrics"
Then execute:
$ bundle
-
See also: Input Plugin Overview
The tag for the event.
Default value: kubernetes.metrics.*
.
How often the plugin should pull metrcs.
Default value: 15s
.
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.
URL of the kubernetes API server.
Path to the certificate file for this client.
Path to the private key file for this client.
Path to the CA file.
If insecure_ssl
is set to true
, apiserver's certificate is not verified.
Path to the file that contains the API token. The default value is the file "token" in secret_dir
.
Path of the location where the pod's service account credentials are stored.
Default value: /var/run/secrets/kubernetes.io/serviceaccount
.
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.
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.
The port that kubelet is listening to.
Default value: 10250
.
Enable to use the rest client to get the metrics from summary api on each kubelet.
Default value: true
.
Enable to use SSL for rest client.
Default value: true
.
See License.