Re: [kubernetes/community] [WIP] Proposal for Exposing Storage Metrics (#855)

4 views
Skip to first unread message

Jing Xu

unread,
Aug 2, 2017, 1:34:40 PM8/2/17
to kubernetes/community, k8s-mirror-storage-feature-requests, Team mention

cc @kubernetes/sig-instrumentation-feature-requests @kubernetes/sig-storage-feature-requests


You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

Frederic Branczyk

unread,
Aug 3, 2017, 5:23:53 AM8/3/17
to kubernetes/community, k8s-mirror-storage-feature-requests, Team mention

@brancz commented on this pull request.


In contributors/design-proposals/storage-metrics.md:

> +
+// PVReference contains enough information to locate the referenced PV.
+type PodReference struct {
+	Name      string `json:"name"`
+	UID       string `json:"uid"`
+}
+
+```
+### Register the VolumeStats metrics to Prometheus 
+
+The following metrics could be registered to Prometheus
+
+
+| Metric name | Metric type | Labels/tags |
+|-------------|-------------|-------------|
+| volume_stats_capacityBytes | Gauge | namespace=\<persistentvolumeclaim-namespace\> <br/> persistentvolumeclaim=\<persistentvolumeclaim-name\>  <br/> persistentvolume=\<persistentvolume-name\> |

mixed snake and camel case


In contributors/design-proposals/storage-metrics.md:

> +```
+// VolumeStats contains data about Volume filesystem usage.
+type VolumeStats struct {
+	// Reference to the measured PVC.
+	PVCRef PVCReference `json:"podRef"`
+	// Reference to the measured PV.
+	PVRef PVReference `json:"podRef"`
+	// Embedded FsStats
+	FsStats
+	// Name is the name given to the Volume
+	// +optional
+	Name string `json:"name,omitempty"`
+}
+
+// PVCReference contains enough information to locate the referenced PVC.
+type PodReference struct {

Comment says PVCReference, struct name is PodReference


In contributors/design-proposals/storage-metrics.md:

> +	// Embedded FsStats
+	FsStats
+	// Name is the name given to the Volume
+	// +optional
+	Name string `json:"name,omitempty"`
+}
+
+// PVCReference contains enough information to locate the referenced PVC.
+type PodReference struct {
+	Name      string `json:"name"`
+	Namespace string `json:"namespace"`
+	UID       string `json:"uid"`
+}
+
+// PVReference contains enough information to locate the referenced PV.
+type PodReference struct {

comment says PVReference, struct name is PodReference

Jing Xu

unread,
Aug 16, 2017, 2:07:29 PM8/16/17
to kubernetes/community, k8s-mirror-storage-feature-requests, Push

@jingxu97 pushed 1 commit.

  • 09d3d24 Update storage-metrics.md


You are receiving this because you are subscribed to this thread.
View it on GitHub or mute the thread.

Tim(Xiaoyu) Zhang

unread,
Aug 30, 2017, 4:21:30 AM8/30/17
to kubernetes/community, k8s-mirror-storage-feature-requests, Team mention

@zhangxiaoyu-zidif commented on this pull request.


In contributors/design-proposals/storage-metrics.md:

> + - In 1.7, an alpha feature is added to isolation emptyDir volume usage and container’s overlay in local storage. User can set a sizeLimit for Pod EmptyDir Volume and eviction manager will take action if the emptyDir volume usage exceeds the configured size. Similarly, user can set request/limit on container’s overlay and eviction manager can take actions based on the monitoring data and the limits.
+ - There is also a proposal targeting for 1.8 [volume resize proposal](https://github.com/kubernetes/community/pull/657) to dynamically resize the volume (network attached) if the disk resource is insufficient. It requires a monitoring pipeline to dynamically check the the disk usage for each volume (represented by PVC)
+
+### Current Monitoring Options
+
+There are a number of monitoring options supported by Kubernetes
+ - Resource Metrics API (Alpha feature in progress [Resource Metrics API](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/resource-metrics-api.md)
+ - Collect metrics in Heapster. (metrics has to exposed by Kubelet in Summary API)
+ - Export metrics through StackDriver 
+ - Kubectl Command (kubectl top, kubectl describe)
+
+All the storage metrics mentioned in Background are collected by Kubelet Summary API so that it could be integrated with the above monitoring system. However, pod volume metrics is provided in PodStat object’s VolumeStat and VolumeStat only has volume name specified in pod specification. There is no direct way of checking volume usage information by PVC name, which is more preferable by users.
+
+
+## Goals
+The gola of this proposal is to expose storage usage metrics to users for monitoring their storage systems.

Is this feature on pod-level ?


You are receiving this because you are on a team that was mentioned.

Reply to this email directly, view it on GitHub, or mute the thread.

Jing Xu

unread,
Sep 1, 2017, 7:20:52 PM9/1/17
to kubernetes/community, k8s-mirror-storage-feature-requests, Team mention

@jingxu97 commented on this pull request.

I think the metric is per volume. Could you explain what you mean by "pod-level"?

Piotr Szczesniak

unread,
Sep 7, 2017, 7:56:03 AM9/7/17
to kubernetes/community, k8s-mirror-storage-feature-requests, Team mention

Is this ready for review? I still can see [WIP] tag in the first line of the doc.

Suraj Deshmukh

unread,
Sep 8, 2017, 6:02:36 AM9/8/17
to kubernetes/community, k8s-mirror-storage-feature-requests, Team mention

@surajssd commented on this pull request.


In contributors/design-proposals/storage-metrics.md:

> + - In 1.7, an alpha feature is added to isolation emptyDir volume usage and container’s overlay in local storage. User can set a sizeLimit for Pod EmptyDir Volume and eviction manager will take action if the emptyDir volume usage exceeds the configured size. Similarly, user can set request/limit on container’s overlay and eviction manager can take actions based on the monitoring data and the limits.
+ - There is also a proposal targeting for 1.8 [volume resize proposal](https://github.com/kubernetes/community/pull/657) to dynamically resize the volume (network attached) if the disk resource is insufficient. It requires a monitoring pipeline to dynamically check the the disk usage for each volume (represented by PVC)
+
+### Current Monitoring Options
+
+There are a number of monitoring options supported by Kubernetes
+ - Resource Metrics API (Alpha feature in progress [Resource Metrics API](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/resource-metrics-api.md)
+ - Collect metrics in Heapster. (metrics has to exposed by Kubelet in Summary API)
+ - Export metrics through StackDriver 
+ - Kubectl Command (kubectl top, kubectl describe)
+
+All the storage metrics mentioned in Background are collected by Kubelet Summary API so that it could be integrated with the above monitoring system. However, pod volume metrics is provided in PodStat object’s VolumeStat and VolumeStat only has volume name specified in pod specification. There is no direct way of checking volume usage information by PVC name, which is more preferable by users.
+
+
+## Goals
+The gola of this proposal is to expose storage usage metrics to users for monitoring their storage systems.

spell: s/gola/goal/

Derek Carr

unread,
Sep 8, 2017, 12:38:36 PM9/8/17
to kubernetes/community, k8s-mirror-storage-feature-requests, Team mention

@derekwaynecarr commented on this pull request.


In contributors/design-proposals/storage-metrics.md:

> + - Kubectl Command (kubectl top, kubectl describe)
+
+All the storage metrics mentioned in Background are collected by Kubelet Summary API so that it could be integrated with the above monitoring system. However, pod volume metrics is provided in PodStat object’s VolumeStat and VolumeStat only has volume name specified in pod specification. There is no direct way of checking volume usage information by PVC name, which is more preferable by users.
+
+
+## Goals
+The gola of this proposal is to expose storage usage metrics to users for monitoring their storage systems.
+
+## Proposal
+
+This proposal has three parts, the first part is trying to address the issue of adding volume usage information indexed by PVC and PV name in Kubelet Summary API. The second part is to register the volume metrics to . The third part is to add more storage metrics to Heapster.
+
+
+### volume usage information indexed by PVC/PV in Kubelet Summary API
+
+The basic idea is to cache PVC and the volume information in kubelet volume manager which is similar to caching the pod and volume information. In Summary API, In Summary API, we could add PVC and PV references into VolumeStats which is included in PodStats.

nit: double "In Summary API"

Jing Xu

unread,
Sep 8, 2017, 1:02:30 PM9/8/17
to kubernetes/community, k8s-mirror-storage-feature-requests, Push

@jingxu97 pushed 1 commit.

  • 895e25f Update storage-metrics.md


You are receiving this because you are subscribed to this thread.

View it on GitHub or mute the thread.

Kiran Mova

unread,
Sep 16, 2017, 11:11:36 PM9/16/17
to kubernetes/community, k8s-mirror-storage-feature-requests, Team mention

@kmova commented on this pull request.


In contributors/design-proposals/storage-metrics.md:

> + - Kubectl Command (kubectl top, kubectl describe)
+
+All the storage metrics mentioned in Background are collected by Kubelet Summary API so that it could be integrated with the above monitoring system. However, pod volume metrics is provided in PodStat object’s VolumeStat and VolumeStat only has volume name specified in pod specification. There is no direct way of checking volume usage information by PVC name, which is more preferable by users.
+
+
+## Goals
+The gola of this proposal is to expose storage usage metrics to users for monitoring their storage systems.
+
+## Proposal
+
+This proposal has three parts, the first part is trying to address the issue of adding volume usage information indexed by PVC and PV name in Kubelet Summary API. The second part is to register the volume metrics to . The third part is to add more storage metrics to Heapster.
+
+
+### volume usage information indexed by PVC/PV in Kubelet Summary API
+
+The basic idea is to cache PVC and the volume information in kubelet volume manager which is similar to caching the pod and volume information. In Summary API, In Summary API, we could add PVC and PV references into VolumeStats which is included in PodStats.

nit: incomplete sentence? "The second part is to register the volume metrics to ."


You are receiving this because you are on a team that was mentioned.

Reply to this email directly, view it on GitHub, or mute the thread.

Kubernetes Submit Queue

unread,
Oct 17, 2017, 4:39:43 PM10/17/17
to kubernetes/community, k8s-mirror-storage-feature-requests, Team mention

This PR hasn't been active in 30 days. It will be closed in 59 days (Dec 16, 2017).

cc @jingxu97 @piosz

You can add 'keep-open' label to prevent this from happening, or add a comment to keep it open another 90 days

Kubernetes Submit Queue

unread,
Nov 17, 2017, 3:06:28 AM11/17/17
to kubernetes/community, k8s-mirror-storage-feature-requests, Team mention

This PR hasn't been active in 61 days. It will be closed in 28 days (Dec 16, 2017).

fejta-bot

unread,
Feb 15, 2018, 3:31:15 AM2/15/18
to kubernetes/community, k8s-mirror-storage-feature-requests, Team mention

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

fejta-bot

unread,
Mar 17, 2018, 5:18:04 AM3/17/18
to kubernetes/community, k8s-mirror-storage-feature-requests, Team mention

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.

/lifecycle rotten
/remove-lifecycle stale

fejta-bot

unread,
Apr 16, 2018, 5:35:12 AM4/16/18
to kubernetes/community, k8s-mirror-storage-feature-requests, Team mention

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.


Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

k8s-ci-robot

unread,
Apr 16, 2018, 5:35:18 AM4/16/18
to kubernetes/community, k8s-mirror-storage-feature-requests, Team mention

Closed #855.

Diogo Guerra

unread,
Apr 26, 2019, 6:03:44 AM4/26/19
to kubernetes/community, k8s-mirror-storage-feature-requests, Team mention

Status?
Was it done?

Justin Keller

unread,
Jan 29, 2020, 4:29:10 PM1/29/20
to kubernetes/community, k8s-mirror-storage-feature-requests, Team mention

👍 I'd like to view how much of a persistent volume is in use and don't know of a way.


You are receiving this because you are on a team that was mentioned.

Reply to this email directly, view it on GitHub, or unsubscribe.

Reply all
Reply to author
Forward
0 new messages