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'