Skip to content
This repository was archived by the owner on Sep 26, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 16 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
[![CircleCI](https://circleci.com/gh/git-lfs/git-lfs.svg?style=shield&circle-token=856152c2b02bfd236f54d21e1f581f3e4ebf47ad)](https://circleci.com/gh/splunk/fluent-plugin-kubernetes-metrics)
# fluent-plugin-kubernetes-metrics

[Fluentd](https://fluentd.org/) input plugin to collect kubernetes cluster metrics from the Summary API, exposed by [Kubelet](https://kubernetes.io/docs/admin/kubelet/) on each node.
This input plugin can be configured to fetch metrics either from kube api server or from the kubelet itself.
The[Fluentd](https://fluentd.org/) input plugin collects kubernetes cluster metrics from the Summary API, which are exposed by [Kubelet](https://kubernetes.io/docs/admin/kubelet/) on each node.

The Fluentd input plugin can be configured to fetch metrics from either the Kublernetes API server or from the Kubelet itself.

## Installation

See also: [Plugin Management](https://docs.fluentd.org/v1.0/articles/plugin-management).
See: [Plugin Management](https://docs.fluentd.org/v1.0/articles/plugin-management).

### RubyGems

Expand All @@ -16,13 +17,13 @@ $ gem install fluent-plugin-kubernetes-metrics

### Bundler

Add following line to your Gemfile:
Add the following line to your Gemfile:

```ruby
gem "fluent-plugin-kubernetes-metrics"
```

And then execute:
Then execute:

```
$ bundle
Expand All @@ -38,19 +39,19 @@ $ bundle

### tag (string) (optional)

The tag of the event.
The tag for the event.

Default value: `kubernetes.metrics.*`.

### interval (time) (optional)

How often it pulls metrcs.
How often the plugin should pull metrcs.

Default value: `15s`.

### kubeconfig (string) (optional)

Path to a kubeconfig file points to a cluster the plugin should collect metrics from. 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` will all be ignored.
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)

Expand All @@ -70,25 +71,25 @@ Path to the CA file.

### insecure_ssl (bool) (optional)

If `insecure_ssl` is set to `true`, it won't verify apiserver's certificate.
If `insecure_ssl` is set to `true`, apiserver's certificate is not verified.

### bearer_token_file (string) (optional)

Path to the file contains the API token. By default it reads from the file "token" in the `secret_dir`.
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 pod's service account's credentials are stored.
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)

Used when use_rest_client config param is enabled. Name of the node that this plugin should collect metrics from. This enables the plugin to fetch metrics from kubelet api.
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)

Used when use_rest_client config param is not enabled. Name of the nodes that this plugin should collect metrics from. This enables the plugin to fetch metrics from kubeapiserver.
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_port (integer) (optional)

Expand All @@ -98,13 +99,13 @@ Default value: `10250`.

### use_rest_client (bool) (optional)

Use the rest client to get the metrics from summary api on each kubelet.
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)

Use SSL for rest client.
Enable to use SSL for rest client.

Default value: `true`.

Expand Down