Skip to content

Commit

Permalink
[metricbeat] Add creation timestamp to state_persistentvolumeclaim me…
Browse files Browse the repository at this point in the history
…tricset (elastic#37108)

* [metricbeat] Add creation timestamp to state_persistentvolumeclaim metricset
  • Loading branch information
barkbay authored Nov 14, 2023
1 parent 66fd810 commit 921dede
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 4 deletions.
11 changes: 10 additions & 1 deletion metricbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -46316,7 +46316,7 @@ type: keyword
[float]
=== persistentvolumeclaim

kubernetes persistent volume clame metrics from kube-state-metrics
kubernetes persistent volume claim metrics from kube-state-metrics



Expand Down Expand Up @@ -46374,6 +46374,15 @@ type: keyword

--

*`kubernetes.persistentvolumeclaim.created`*::
+
--
PersistentVolumeClaim creation date

type: date

--

[float]
=== pod

Expand Down
2 changes: 1 addition & 1 deletion metricbeat/module/kubernetes/fields.go

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"namespace": "default",
"persistentvolumeclaim": {
"access_mode": "ReadWriteOnce",
"created": "2023-10-31T11:19:20.000Z",
"name": "task-pv-claim",
"phase": "Bound",
"request_storage": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
- name: persistentvolumeclaim
type: group
description: >
kubernetes persistent volume clame metrics from kube-state-metrics
kubernetes persistent volume claim metrics from kube-state-metrics
release: ga
fields:
- name: name
Expand All @@ -22,4 +22,7 @@
- name: storage_class
type: keyword
description: Storage class for the PVC.

- name: created
type: date
description: PersistentVolumeClaim creation date

Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
},
"MetricSetFields": {
"access_mode": "ReadWriteOnce",
"created": "2023-10-31T11:19:20.000Z",
"name": "task-pv-claim",
"phase": "Bound",
"request_storage": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
},
"MetricSetFields": {
"access_mode": "ReadWriteOnce",
"created": "2023-08-09T08:06:42.000Z",
"name": "task-pv-claim",
"phase": "Bound",
"request_storage": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
},
"MetricSetFields": {
"access_mode": "ReadWriteOnce",
"created": "2023-08-09T08:08:46.000Z",
"name": "task-pv-claim",
"phase": "Bound",
"request_storage": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"namespace": "default",
"persistentvolumeclaim": {
"access_mode": "ReadWriteOnce",
"created": "2023-10-31T11:19:20.000Z",
"name": "task-pv-claim",
"phase": "Bound",
"request_storage": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"namespace": "default",
"persistentvolumeclaim": {
"access_mode": "ReadWriteOnce",
"created": "2023-10-31T11:19:20.000Z",
"name": "task-pv-claim",
"phase": "Bound",
"request_storage": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"namespace": "default",
"persistentvolumeclaim": {
"access_mode": "ReadWriteOnce",
"created": "2023-08-09T08:06:42.000Z",
"name": "task-pv-claim",
"phase": "Bound",
"request_storage": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"namespace": "default",
"persistentvolumeclaim": {
"access_mode": "ReadWriteOnce",
"created": "2023-08-09T08:08:46.000Z",
"name": "task-pv-claim",
"phase": "Bound",
"request_storage": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ var mapping = &p.MetricsMapping{
Metrics: map[string]p.MetricMap{

"kube_persistentvolumeclaim_access_mode": p.LabelMetric("access_mode", "access_mode"),
"kube_persistentvolumeclaim_created": p.Metric("created", p.OpUnixTimestampValue()),
"kube_persistentvolumeclaim_info": p.InfoMetric(),
"kube_persistentvolumeclaim_labels": p.ExtendedInfoMetric(
p.Configuration{
Expand Down

0 comments on commit 921dede

Please sign in to comment.