【问题标题】:Is it possible to Compile Stackdriver monitoring agent from source是否可以从源代码编译 Stackdriver 监控代理
【发布时间】:2016-03-31 00:59:21
【问题描述】:

Ubuntu 15:10 似乎还没有可用的 Stackdriver 监控代理包。源可以安装吗?

【问题讨论】:

    标签: stackdriver google-cloud-monitoring


    【解决方案1】:

    我在 Google 的 Stackdriver 代理工作。在 Ubuntu 上,我们仅支持 LTS 版本,因此如果您可以使用 Ubuntu 14.04 或 16.04,那将是我们的强烈偏好。

    也可以使用 14.04 或 16.04 包并对其进行修改,使其适用于 15.10。

    但话虽如此,如果您真的想在 15.10 上构建,这些是执行此操作的说明。我刚刚在 15.10 实例上对它们进行了测试,因此我可以确认它们在五分钟前可以工作。 :-)

    我们再次正式支持 15.10,所以如果这不能可靠地工作,我们将无法提供任何额外的帮助。

    sudo apt-get -y update && sudo apt-get -y install git flex bison gcc automake pkg-config libtool libgcrypt-dev glib2.0-dev make libssl-dev libyajl-dev libcurl4-openssl-dev
    git clone https://github.com/Stackdriver/collectd.git
    cd collectd/
    git checkout stackdriver-agent-5.5.0
    ./clean.sh && ./build.sh
    ./configure --prefix=/opt/stackdriver/collectd --program-prefix=stackdriver- --disable-all-plugins --enable-cpu --enable-df --enable-disk --enable-load --enable-logfile --enable-memory --enable-swap --enable-syslog --enable-interface --enable-tcpconns --enable-write_http --enable-write_gcm --disable-static --enable-aggregation --enable-csv --enable-nginx --enable-apache --enable-memcached --enable-mysql --enable-postgresql --disable-perl --without-libperl --without-perl-bindings --enable-mongodb --with-libmongoc=own --enable-plugin_mem --enable-processes --enable-ntpd --enable-zookeeper --enable-exec --enable-curl_json --enable-match_regex --enable-target_set --enable-match_throttle_metadata_keys --enable-target_replace --enable-target_scale --enable-debug --with-useragent="stackdriver_agent/myagent"
    make
    sudo make install
    

    然后获取一个合适的 collectd.conf 并在前台运行它

    sudo /opt/stackdriver/collectd/sbin/stackdriver-collectd -f -C ~/my.collectd.conf 
    

    或在后台省略 -f。

    获得“合适的”collectd.conf 的最简单方法是获取我们的生产包,安装或检查它,然后使用根据您的喜好修改的文件/opt/stackdriver/collectd/etc/collectd-gcm.conf.tmpl

    【讨论】:

    • 你们不支持 18.04 Bionic 版本。我可以用它启动一个实例,但不能设置监控代理。那是蹩脚的。
    【解决方案2】:

    我发现遵循 Corey Kosak 的指示是可行的,但我必须使用 Ubuntu 18.04 的“gabeperez-test-bionic-changes”分支。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-09-08
      • 1970-01-01
      • 2022-01-19
      • 1970-01-01
      • 2021-02-17
      • 2010-09-13
      • 1970-01-01
      • 2019-12-12
      相关资源
      最近更新 更多