Score:1

Ops Agent installation

jp flag

I have a Compute Instance (Ubuntu 20.04) and have recently installed google-cloud-ops-agent (both via the "INSTALL AGENT" button on a variety of monitoring dashboards which install the agent through Cloud Shell as well as by manually downloading and executing the installation bash script from within the VM). The agent appears to install fine and the service is running in the VM but the monitoring dashboard still reports "Pending" in the agent's status; eventually dropping back to the pre-installation status of "Not Detected" after some period of time.

Can someone point me to whatever firewall rules, IAM service account permissions, logs or other that I should begin looking at to troubleshoot?

Score:1
ph flag

You should avoid using the basic roles "editor" and "owner" at the project or org layer wherever possible, especially if this is for a business account. The least privilege rules for the op agent would be "Monitoring Metric Writer" and "Logs Writer". That will allow it to write metrics to the monitoring pane and to create logs for events.

This is just for best practice though, if you're testing temporarily, may not be a big deal.

jp flag
I am not testing temporarily; and it was on my TO DO list to begin paring the permissions down until the Agent was operating with only those permissions it required. I will immediately reduce that Service Account's permissions to just those two and see how I fare. Thank you!
Score:1
jp flag

[SOLVED]

My suspicion was that it was a Service Account permissions issue; but I could not find a reference for what permissions should be set as default. So I created a new Project, quickly spun up a VM and installed the Ops Agent and compared the information on the IAM pages of the two respective projects. I immediately saw the presence in the new project of a [email protected] which had Editor privileges in the dummy Project. Within seconds of me adding [email protected] as an Editor in the problem Project the metrics appeared.

I am unsure how [email protected] would have been removed or not created/ assigned privileges. Maybe I absentmindedly consented to some recommendation on the Dashboard?

Thanks for your time, Erhard!

asmath avatar
cn flag
Thanks, solved my issue after giving editor role permission to my attached compute engine service account.
Score:0
mw flag

If you haven't checked it already see if the public Ops Agent troubleshooting guide helps. It should cover most issues. You can find it here

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.