Search code examples
kubernetesmetrics

Is there another way to get "fs" metric of node besides /stats/summary


We've been using /stats/summary to get fs metrics, which is like:

"fs": {
 "time": "2021-10-14T03:46:05Z",
 "availableBytes": 17989276262,
 "capacityBytes": 29845807308,
 "usedBytes": 5856531046,
 "inodesFree": 16799593,
 "inodes": 17347097,
 "inodesUsed": 57504
},

And due to this Move away from kubelet stats/summary, we need to get the same data in another way.

We've tried /metrics/cadvisor and /metrics/resources, but were not successful to get fs data. Also, it seems that CAdvisor will also be deprecated (in TBD+2 here)

We've been searching the net for possible solution but can't seem to find any.

Any ideas on how this can be done? Or probably point us to the right direction or documentation?

Thank you in advance.


Solution

  • Posted community wiki based on Github topic. Feel free to expand it.


    Personally, I have not found any equivalent of this call (/api/v1/nodes/<node name>/proxy/stats/summary), and as it is still working and not deprecated in the Kubernetes newest versions ( 1.21 and 1.22), I'd recommend just using it and wait for information about replacement from the Kubernetes team. Check below information:

    Information from this GitHub topic - # Reduce the set of metrics exposed by the kubelet #68522 (last edited: November 2020, issue open):

    It seems that /stats/summary/ does not have any replacement recommendation ready:

    [TBD] Propose out-of-tree replacements for kubelet monitoring endpoints

    They will keep the Summary API for the next four versions counting from the version in which replacement will be implemented:

    [TBD+4] Remove the Summary API, cAdvisor prometheus metrics and remove the --enable-container-monitoring-endpoints flag.


    In Kubernetes v1.23 changelog there is no information about changing anything related to the Summary API.

    I'd suggest observing and pinging Kubernetes developers directly in this GitHub topic for more information.