如何检查有多少个Google Cloud Run容器正在运行? [英] How can I check how many instances of a Google Cloud Run container are running?

查看:56
本文介绍了如何检查有多少个Google Cloud Run容器正在运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Google Cloud Run允许我为给定的容器设置 concurrency ,这是在启动新容器之前它将处理的并发请求数.

Google Cloud Run lets me set a concurrency for a given container, which is how many concurrent requests it will service before a new container is spun up.

我实际上如何检查在给定时间有多少个容器在运行?Web界面会提及正在运行的服务,但没有提及其中的多少,当我执行 gcloud beta运行服务(列表|描述)时,情况也是如此.

How do I actually check how many containers are running at any given time? The web interface mentions which services are running but not how many of them there are, and the same is true when I do gcloud beta run services (list|describe).

推荐答案

云运行报告云监控"中的容器实例数

可计费实例时间指标可计算您有多少实例时间收费.例如,如果带有2个容器实例的修订版在最后一分钟一直在持续为流量提供服务,则该值为2s/s.

The Billable instance time metric counts how many instance time you are charged for. For example, if a Revision with 2 container instances has been continuously serving traffic in the last minute, the value is 2s/s.

或者,您可以将日志导出到BigQuery .每个日志条目都有一个实例ID作为标签(请参见 docs ),您可以分组并计数.

Alternatively, you can export your logs to BigQuery. Each log entry has an instance ID as label (see docs) that you can group by and count.

这篇关于如何检查有多少个Google Cloud Run容器正在运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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