如何获取GKE节点池中的节点数作为Stackdriver指标? [英] How to get the number of nodes in a GKE node pool as a stackdriver metric?

查看:86
本文介绍了如何获取GKE节点池中的节点数作为Stackdriver指标?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在GCP Stackdriver中制作一个仪表板.我们有一个自动扩展的节点池,我有兴趣监视的Pod会在其中运行.我想知道如何监视池中当前正在运行的节点数量?

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.

推荐答案

本身没有节点数量的度量标准.虽然我们可以得到类似的结果,但是总核的总和由 cluster_name 分组:

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:

这篇关于如何获取GKE节点池中的节点数作为Stackdriver指标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆