【问题标题】:`gcloud compute instances create-with-container` is logging to stackdriver, but not including memory information?`gcloud compute instances create-with-container`正在记录到stackdriver,但不包括内存信息?
【发布时间】:2020-10-05 20:47:00
【问题描述】:

我正在使用 create-with-container 命令启动 g1-small。我可以看到 CPU、网络流量和 I/O,但看不到内存。我错过了什么吗?

【问题讨论】:

    标签: gcloud stackdriver


    【解决方案1】:

    以下是计算指标:

    https://cloud.google.com/monitoring/api/metrics_gcp#gcp-compute

    如果您在“内存”上按 CTRL-F,则有 2 种“类型”:

    • /guest/memory
    • /instance/memory -- 这些适用于 e2 系列(不是 g1-small)

    对于/guest/ 指标,您应该遵循以下指南:

    https://cloud.google.com/container-optimized-os/docs/how-to/monitoring

    然后你应该能够观察例如guest/memory/bytes_used

    您可以通过 ssh 进入您的虚拟机,手动运行 node-problem-detector,然后使用指标资源管理器,例如 hack bytes_used:

    • gcloud compute ssh instance ...
    • sudo systemctl start node-problem-detector
    • sudo journalctl --unit=node-problem-detector

    还有:

    【讨论】:

      猜你喜欢
      • 2020-03-29
      • 2020-03-26
      • 2021-11-20
      • 1970-01-01
      • 1970-01-01
      • 2019-01-18
      • 1970-01-01
      • 1970-01-01
      • 2017-09-13
      相关资源
      最近更新 更多