0

I faced with the issue that cloud-ops-agent consumes too much of the CPU, so I'd like to update a version of it (I found that it was a known issue for certain version). Right now I have version 2.22.0 and I'd like to update it to the latest one (2.28.0). I used command from the official google docs:

curl -sSO https://dl.google.com/cloudagents/add-google-cloud-ops-agent-repo.sh
sudo bash add-google-cloud-ops-agent-repo.sh --also-install

But this installs version 2.24.0 And I can see that Debian/Ubuntu repositories indeed have the only 2.24.0 version. enter image description here I'm using Linux Ubuntu 20.04.2 LTS (Focal Fossa) and unless I'm missing something there is no restriction of using v2.28.0 on that OS version. So, my question - is there any alternative way to install the latest version? I'd appreciate any advice)

1 Answers1

0

You can install a specific version using the --version flag or this command

sudo bash add-google-cloud-ops-agent-repo.sh --also-install --version=MAJOR_VERSION.*.*

just replace the MAJOR_VERSION.*.* with the desired version of the Ops Agent

then check the installed version using

dpkg-query --show --showformat '${Package} ${Version} ${Architecture} ${Status}\n' google-cloud-ops-agent

enter image description here

Siegfred V.
  • 1,143
  • 3
  • 12
  • Thanks a lot for the reply, but unfortunately I still have the same problem. I tried to run `sudo bash add-google-cloud-ops-agent-repo.sh --also-install --version=2.28.0` and I'm getting the following error `E: Version '2.28.0~*' for 'google-cloud-ops-agent' was not found`. – Александр Брянский Mar 21 '23 at 10:04
  • If you have the old agents installed, you should complete the [uninstall steps for the Cloud Monitoring agent](https://cloud.google.com/monitoring/agent/monitoring/installation#uninstall) then re run the installation command – Siegfred V. Mar 21 '23 at 15:01