简体   繁体   English

GCP 中使用 Stackdriver Kubernetes Engine Monitoring 的日志条目的指标是什么?

[英]What are the metrics of log entries with Stackdriver Kubernetes Engine Monitoring in GCP?

I use Google Kubernetes Engine(GKE) to deploy my service.我使用 Google Kubernetes Engine(GKE) 来部署我的服务。 In the cluster, I enable Stackdriver Kubernetes Engine Monitoring instead of Legacy Stackdriver Logging and Legacy Stackdriver Monitoring .在集群中,我启用了Stackdriver Kubernetes Engine Monitoring而不是Legacy Stackdriver LoggingLegacy Stackdriver Monitoring With the legacy monitor, I can find the metrics of the number of logs with the name log entries .使用旧版监视器,我可以找到名为log entries的日志数量的指标。 What is the corresponding metrics name with Stackdriver Kubernetes Engine Monitoring ? Stackdriver Kubernetes Engine Monitoring对应的指标名称是什么?

If you go to Stackdriver monitoring > Resources > Metrics Explorer and select "Kubernetes cluster" as a resource type, you can find a metric called "log_entry_count" and select it.如果您将 go 到 Stackdriver监控> 资源 > 指标资源管理器和 select “Kubernetes 集群”作为资源类型,您可以找到一个名为“log_entry_count”的指标和 Z99938282F04076EFCF421it.ZZ18 This metric is also mentionedhere . 这里也提到了这个指标。

So - the metric you're asking about is still there - no matter if you create a cluster with Stackdriver Kubernetes Engine Monitoring enabled or no.所以 - 您询问的指标仍然存在 - 无论您是否创建启用了Stackdriver Kubernetes 引擎监控的集群。

Furthermore - it will still collect data about number of logs ingested.此外 - 它仍将收集有关摄取日志数量的数据。

To be sure of the metric existence and if it actually does work I created a test cluster with some back-end service which generated some log entries and then tried "log entries" metric to count them - it worked as it should.为了确定指标的存在以及它是否确实有效,我创建了一个带有一些后端服务的测试集群,该服务生成了一些日志条目,然后尝试使用“日志条目”指标来计算它们——它应该可以正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM