Skip to content

Instantly share code, notes, and snippets.

@ardislu
Last active November 8, 2021 05:32
Show Gist options
  • Save ardislu/5feec4dd2e4ec9588072df73d734a145 to your computer and use it in GitHub Desktop.
Save ardislu/5feec4dd2e4ec9588072df73d734a145 to your computer and use it in GitHub Desktop.
Download and install the ops agent for a Google Compute instance.
#!/usr/bin/env bash
# Download ops agent script, install it, and check that the agent is running
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
sudo systemctl status google-cloud-ops-agent"*"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment