How to collect more Kubernetes metrics

It is possible to collect more Kubernetes metrics. Via cAdvisor, many metrics are available for you to visualize and monitor. Our kubernetes integration only collects some of them but there is a way to collect other ones!

This is a quick example of how to see what is available after you have your cluster running:

cluster :> kubectl proxy &
[1] 13874
Starting to serve on
cluster :> NODE=$(kubectl get nodes -o=jsonpath="{.items[0]}")
cluster :> curl localhost:8001/api/v1/proxy/nodes/${NODE}:10255/stats/summary

This will return the following output.

cluster :> curl localhost:8001/api/v1/proxy/nodes/${NODE}:10255/stats/

This will return the following output.  

The last output, despite being very large is very interesting. Say you are interested in monitoring the filesystems data:
"inodes": 2097152,
"inodes_free": 1961006,
"reads_completed": 122114,
"reads_merged": 5356,
"sectors_read": 6773608,


The memory that is not already captured:
"cache": 61157376,
"rss": 90644480,
"swap": 0,
"working_set": 872525824,
"failcnt": 0,


And the network tcp6 information:
"Established": 0,
"SynSent": 0,
"SynRecv": 0,
"FinWait1": 0,
"FinWait2": 0,
"TimeWait": 0,


Then, you can update your kubernetes.yaml on these following lines with :


Quick tip, as per the original Kubernetes article, you can use the configmaps to configure your integration on the go, thus, you can use the following configmap and daemonset description.

And as you spin up the daemonset and the configmap, you can see the metrics starting to populate UI :






Have more questions? Submit a request


Article is closed for comments.
Powered by Zendesk