我正在尝试安装Stackdriver Agent。我正在使用谷歌云实例(os Ubuntu),并按照谷歌云文档中的指示进行监控。这是我服务器控制台的日志。
root@instance-1:~/opt# sudo bash stack-install.sh --write-gcm
Installing agents for Debian or Ubuntu.
curl: (22) The requested URL returned error: 404 Not Found
OK
Hit:1 http://asia-east1.gce.archive.ubuntu.com/ubuntu yakkety InRelease
Hit:2 http://asia-east1.gce.archive.ubuntu.com/ubuntu yakkety-updates InRelease
Get:3 http://asia-east1.gce.archive.ubuntu.com/ubuntu yakkety-backports InRelease [102 kB]
Ign:4 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 InRelease
Hit:5 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 Release
Hit:6 http://security.ubuntu.com/ubuntu yakkety-security InRelease
Hit:8 http://archive.canonical.com/ubuntu yakkety InRelease
Hit:9 https://deb.nodesource.com/node_6.x yakkety InRelease
Fetched 102 kB in 0s (111 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package stackdriver-agent
Installation failed.
root@instance-1:~/opt#
答案 0 :(得分:0)
答案 1 :(得分:0)
首先,您需要输入以下内容:
sudo apt-cache madison stackdriver-agent
显示代理的可用版本列表以选择要安装的版本。
结果:
stackdriver-agent | 6.0.2-1。仿生| http://packages.cloud.google.com/apt google-cloud-monitoring-bionic-all / main amd64软件包
stackdriver-agent | 6.0.1-1.bionic | http://packages.cloud.google.com/apt google-cloud-monitoring-bionic-all / main amd64软件包
stackdriver-agent | 6.0.0-1.bionic | http://packages.cloud.google.com/apt google-cloud-monitoring-bionic-all / main amd64软件包
stackdriver-agent | 5.5.2-1002.bionic | http://packages.cloud.google.com/apt google-cloud-monitoring-bionic-all / main amd64软件包
stackdriver-agent | 5.5.2-1001.bionic | http://packages.cloud.google.com/apt google-cloud-monitoring-bionic-all / main amd64软件包
然后:
sudo apt-get install -y 'stackdriver-agent=[MAJOR_VERSION].*'
例如,要固定至该代理的6.0.2-1仿生,请运行:
sudo apt-get install -y 'stackdriver-agent=6.0.2-1.bionic*'