【问题标题】:Installing a Monitoring Agent on GCE在 GCE 上安装监控代理
【发布时间】:2018-06-23 14:32:57
【问题描述】:

我正在尝试使用 Debian 9 在我的 f1-micro 实例上安装监控代理并运行 dockerised 应用程序。我正在关注https://cloud.google.com/monitoring/agent/install-agent#linux-install 教程。当我执行sudo bash install-monitoring-agent.sh 时,我收到一条消息Unidentifiable or unsupported platform.

我做错了什么吗?

【问题讨论】:

  • 请检查您使用的是哪个外壳。是 bash 还是 ksh 或其他任何东西。如果不是 bash,则更改您正在使用的最后一个命令。
  • 我已经检查过了。这是bash

标签: google-cloud-platform google-compute-engine google-cloud-monitoring


【解决方案1】:

在 bash 脚本中,您会看到他正在查看 [/etc/os-release] 上的 os-release,如下所示:

================================================ ==============================

# Fallback for systems lacking /etc/os-release.
      if [[ -f /etc/debian_version ]]; then
        echo 'Installing agent for Debian.'
        install_for_debian
      elif [[ -f /etc/redhat-release ]]; then
        echo 'Installing agent for Red Hat.'
        install_for_redhat
      else
        echo >&2 'Unidentifiable or unsupported platform.'
        echo >&2 "See ${MONITORING_AGENT_SUPPORTED_URL} for a list of supported platforms."
        exit 1

检查 [/etc/os-release]。 通常支持 Debian,我确实用 Debian 安装了 {f1-micro} 机器,它运行良好,输出应该如下所示:

~$ sudo cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

【讨论】:

  • 是的,我刚刚意识到谷歌只在“谷歌的容器优化操作系统”上运行 docker 镜像,并且监控引擎不支持这个操作系统。
猜你喜欢
  • 2019-12-02
  • 2023-04-02
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-04-30
  • 2021-10-02
  • 1970-01-01
相关资源
最近更新 更多