Monitoring and alerting on pod status or restart with Google Container Engine (GKE) and Stackdriver

前端 未结 4 2147
伪装坚强ぢ
伪装坚强ぢ 2021-02-05 09:53

Is there a way to monitor the pod status and restart count of pods running in a GKE cluster with Stackdriver?

While I can see CPU, memory and disk usage metrics for all

4条回答
  •  春和景丽
    2021-02-05 10:29

    You can achieve this manually with the following:

    1. In Logs Viewer, creating the following filter:

      resource.labels.project_id=""
      resource.labels.cluster_name=""
      resource.labels.namespace_name=""
      jsonPayload.message:"failed liveness probe"
      
    2. Create a metric by clicking on the Create Metric button above the filter input and filling up the details.

    3. You may now track this metric in Stackdriver.

    Would be happy to be informed of a built-in metric instead of this.

提交回复
热议问题