Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get the number of nodes in a GKE node pool as a stackdriver metric?

I'm making a dashboard in GCP stackdriver. We have a autoscaling node pool which the pods I'm interested in monitoring run in. What I'm wondering is how do I monitor the amount of nodes the are currently running in the pool?

I've had a look at log based metrics, but I can't find anywhere in the logs where it actually says how many nodes are currently running.

like image 971
Andy Avatar asked Nov 07 '22 14:11

Andy


1 Answers

There's no metric for number of nodes per se. We can get something similar though with the sum of Total cores grouped by cluster_name:

stackdriver resource selection

like image 97
Aleksi Avatar answered Nov 28 '22 09:11

Aleksi