在GCE上安装监视代理

时间:2018-06-23 14:32:58

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

我正在尝试使用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.

我做错什么了吗?

1 个答案:

答案 0 :(得分:0)

在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/"