-
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: add kube-state-metrics persistentvolumes (#14859
- Loading branch information
Pablo Mercado
authored
Dec 19, 2019
1 parent
eb646c1
commit a586a35
Showing
18 changed files
with
466 additions
and
4 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
32 changes: 32 additions & 0 deletions
32
metricbeat/module/kubernetes/state_persistentvolume/README.md
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Kube-state-metrics/PersistentVolume | ||
|
||
|
||
This metricset connects to kube-state-metrics endpoint to retrieve and report Persistent Volume metrics. | ||
|
||
## Version history | ||
|
||
- November 2019, first release using kube-state-metrics `v1.8.0`. | ||
|
||
## Configuration | ||
|
||
See the metricset documentation for the configuration reference. | ||
|
||
## Manual testing | ||
|
||
Running a minikube cluster allows you to create persistent volume using the `/data/` directory at hostpath | ||
|
||
```yaml | ||
apiVersion: v1 | ||
kind: PersistentVolume | ||
metadata: | ||
name: pv0001 | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
capacity: | ||
storage: 5Gi | ||
hostPath: | ||
path: /data/pv0001/ | ||
``` | ||
Try adding labels, and creating volumes from pods using PVC. |
21 changes: 21 additions & 0 deletions
21
metricbeat/module/kubernetes/state_persistentvolume/_meta/fields.yml
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
- name: persistentvolume | ||
type: group | ||
description: > | ||
kubernetes persistent volume metrics from kube-state-metrics | ||
release: experimental | ||
fields: | ||
- name: name | ||
type: keyword | ||
description: Volume name. | ||
- name: capacity.bytes | ||
type: long | ||
description: Volume capacity | ||
- name: phase | ||
type: keyword | ||
description: Volume phase according to kubernetes | ||
- name: storage_class | ||
type: keyword | ||
description: Storage class for the volume | ||
|
||
|
||
|
Oops, something went wrong.