-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Metricbeat Kubernetes module and metricsets docs proposal (#17636)
- Loading branch information
Showing
6 changed files
with
166 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,32 @@ | ||
This is the `apiserver` metricset of the Kubernetes module. | ||
This is the `apiserver` metricset of the Kubernetes module, in charge of retrieving metrics from the Kubernetes API (available at `/metrics`). | ||
|
||
This metricset needs access to the `apiserver` component of Kubernetes, accessible typically by any POD via the `kubernetes.default` service or via environment variables (`KUBERNETES_SERVICE_HOST` and `KUBERNETES_SERVICE_PORT`). | ||
|
||
When the API uses https, the pod will need to authenticate using its default token and trust the server using the appropiate CA file. | ||
|
||
Configuration example using https and token based authentication: | ||
|
||
```yaml | ||
- module: kubernetes | ||
enabled: true | ||
metricsets: | ||
- apiserver | ||
hosts: ["https://${KUBERNETES_SERVICE_HOST}:${KUBERNETES_SERVICE_PORT}"] | ||
#hosts: ["https://kubernetes.default"] | ||
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token | ||
ssl.certificate_authorities: | ||
- /var/run/secrets/kubernetes.io/serviceaccount/ca.crt | ||
period: 30s | ||
``` | ||
|
||
In order to access the `/metrics` path of the API service, some Kubernetes environments might require the following permission to be added to a ClusterRole. | ||
|
||
```yaml | ||
rules: | ||
- nonResourceURLs: | ||
- /metrics | ||
verbs: | ||
- get | ||
``` | ||
|
||
The previous configuration and RBAC requirement is available in the complete example manifest proposed in <<running-on-kubernetes, Running Metricbeat on Kubernetes>> document. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters