0

I have created this ops-agent policy to install ops-agent on all my running Ubuntu 22.04 VMs, but the policy exists in the Cloud console when I navigate to Monitoring -> Dashboards -> VM instances, it shows that it's Legacy agent is installed (image below) and the agent seems uninstalled, what I'm missing here? what is the best way to install the ops agent automatically in any created VM managed by Instance Group?

gcloud beta compute instances ops-agents policies describe ops-agents-stag-policy --project=PROJECT-NAME
agent_rules:
- enable_autoupgrade: true
  package_state: installed
  type: ops-agent
  version: 2.*.*
assignment:
  group_labels:
  - env: PROJECT-NAME
    product: programs
  instances: []
  os_types:
  - short_name: ubuntu
    version: '22.04'
  zones:
  - europe-west1-b
create_time: '2024-02-14T13:23:07.226508Z'
description: A stag policy for programs.
etag: 0000000000000-ae63-468c-997f-0000000000000
id: projects/0000000000000/guestPolicies/ops-agents-stag-policy
update_time: '2024-02-14T13:23:07.226508Z'

enter image description here

1 Answer 1

0

You say you want to install Ops Agent on your Ubuntu 20.04 VMs. Your policy says 22.04. I think you have a typo to correct here.

1
  • Sorry, it's just a typo in the question, all my instances are 22 Ubuntu. Commented Feb 18 at 12:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .