Last active
November 8, 2021 05:31
-
-
Save ardislu/ad47dd596aadaee4e87ad834a7fa2ed3 to your computer and use it in GitHub Desktop.
Download, install, and start the monitoring and logging agents for a Google Compute instance.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # NOTE: These are legacy agents that are replaced by the Ops Agent | |
| # https://cloud.google.com/stackdriver/docs/solutions/agents/ops-agent/installation | |
| # Download monitoring agent script, install it, and start the agent | |
| curl -sSO https://dl.google.com/cloudagents/add-monitoring-agent-repo.sh | |
| sudo bash add-monitoring-agent-repo.sh --also-install | |
| sudo service stackdriver-agent start | |
| # Download logging agent script, install it, and start the agent | |
| curl -sSO https://dl.google.com/cloudagents/add-logging-agent-repo.sh | |
| sudo bash add-logging-agent-repo.sh --also-install | |
| sudo service google-fluentd start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment