-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kubelet space/inodes usage (e.g. kubelet_volume_stats_used_bytes
) is missing
#51
Comments
Hi @vaskozl, If you don't mind sharing, could you please let us know which protocol you are using? Is it iscsi or smb? |
That's great @chihyuwu ! I use predominantly iSCSI with |
@vaskozl Thank you for your feedback, and please continue to share your ideas with us. :) |
EBS implementation: https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/677/files Should be able to do it similarly. A bit silly that kubelet doesn't just look at the block device itself. |
Looks likes NodeGetVolumeStats is already implemented but the RPC_GET_VOLUME_STATS capability is still commented out with a TODO. @chihyuwu is there a reason for that? Looks like just reporting the capability should get it working. I note that it uses the reported size from DSM, which appears full when using discard (default). We might want to just check the filesystem usage directly on the node via the volumePath like in the EBS implementation. |
I've removed the comment and I now have stats in grafana! Also I believe #36 is after the same thing. As predicted all the volumes provisioned with "discard" are 100% used up so it's not terribly useful for those as is. I've switched my storage class to nodiscard now but still have lots of volumes from before the format params were added. I think reporting the inodes like the EBS csi is the correct way to resolve this anyway. |
In this commit I've made the nodeserver use statfs instead of just taking the whole filesystem size as returned by DSM. This is in line with what the other CSI drivers do. I'm getting stats for all my LUN volumes based on the used filesystem now and those erroneous Happy to make a PR if you are interested in merging it. |
Hi @vaskozl |
do you have example for metrics exporter |
@newbenji metrics are exposed via the |
i just dont see a metrics exporter somewhere.. thats why i ask |
but i can see they are there so thx |
Typically metrics for volumes are available via the kubelet summary API (/stats/summary).
Monitoring solutions like Prometheus with Alertmanager will scrape metrics from kubelet about volume usage and alert when a disk if filling up. This doesn't work when using the synology-csi since there are no such metrics since the csi does not seem to implement them.
Missing:
kubelet_volume_stats_used_bytes
kubelet_volume_stats_inodes
There are some histogram metrics (less useful) that are available:
Reporting the volume usage is critical to avoid cases where one runs out of disk and ultimate application failure.
The text was updated successfully, but these errors were encountered: