Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

VM Agent Install Pending for over a week

On my VM's observability tab, I clicked to install the monitoring agent to see memory and disk utilization charts.

It has had a spinning wheel and an 'Agent Install Pending' message for over a week now and the charts still haven't shown up. Ive restarted the VM a few times. Still nothing.

What can I do to troubleshoot?

0 2 306
2 REPLIES 2

Hi @devanshl,

Welcome to Google Cloud Community! 

If the agent status on the Cloud Monitoring VM instances dashboard or the observability tab on a Compute Engine VM details page stays in the Pending state for more than 10 minutes, it might indicate one of the following issues:

  • A problem applying the policy
  • A problem with the actual installation of the Ops Agent
  • A connectivity issue between the VM and Cloud Monitoring

To run the policy-diagnostics script, execute this command:

curl -sSO https://dl.google.com/cloudagents/diagnose-ui-policies.shbash diagnose-ui-policies.sh VM_NAME VM_ZONE

To diagnose these issues, you can use the general agent-diagnostics script and health checks.

You must have the roles/osconfig.osPolicyAssignmentViewer role to run this script. The script will provide information about affected VMs and related automatic installation policies.

After examining the logs and addressing any issues you found, try reinstalling the agent manually

For more information on diagnosing and addressing issues with the installation and startup of the Ops Agent, see Troubleshoot Ops Agent installation and startup. 

I hope the above information is helpful.

Thanks the troubleshooting link lead me to the command: `sudo systemctl status google-cloud-ops-agent"*"`  which revealed my service account was missing some policies, i added the policies and restarted the agent to fix it.

`sudo service google-cloud-ops-agent stop`

`sudo service google-cloud-ops-agent start`