简体   繁体   English

GKE 可以按应用过滤日志吗?

[英]Can GKE filter logs by application?

We are GKE managing several applications:我们是 GKE 管理几个应用程序:

  • app1应用程序1
  • app2应用程序2
  • app3应用程序3

In GCP Error Reporting dashboard, errors are intermixed for all the applications.在 GCP 错误报告仪表板中,所有应用程序的错误混合在一起。 For example, the errors below are coming from a different app.例如,以下错误来自不同的应用程序。

在此处输入图像描述

However in the Configure Notifications tab, there is no option to setup alerts based on app/conditions.但是,在“ Configure Notifications ”选项卡中,没有根据应用程序/条件设置警报的选项。

I'd like to be able to setup different notifcation channels depending on app eg.我希望能够根据应用程序设置不同的通知渠道,例如。 app1 -> slack, app2 -> email . app1 -> slack, app2 -> email We have different ops team that handle these apps and having them go to a shared, noisy Slack channel is not ideal.我们有不同的运营团队来处理这些应用程序,让它们 go 进入一个共享的、嘈杂的 Slack 频道并不理想。 Also, it would be great to setup alerts based on exception details - for example all Java RuntimeExceptions result in different alerts.此外,最好根据异常详细信息设置警报 - 例如,所有 Java RuntimeExceptions 都会产生不同的警报。

What the conventional way to setup fine-grained alerts like these?像这样设置细粒度警报的传统方法是什么?

In the GCP Logs explorer (if in the legacy explorer, need to click upgrade) you can create an alert using this button, which will let you setup an alert anytime some criteria is met based on a log condition.在 GCP 日志资源管理器中(如果在旧版资源管理器中,需要单击升级),您可以使用此按钮创建警报,这样您就可以根据日志条件在满足某些条件时随时设置警报。

在此处输入图像描述

It will then create an entry in the monitoring tab under alerting and the rest is straightforward然后它将在警报下的监控选项卡中创建一个条目,rest 很简单

在此处输入图像描述

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

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