Add an optional Cloud Ops Agent install script #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changed
This PR adds the
cloud_ops_agent_enabled
flag that fetches and installs the latest cloud ops agent during the startup. The actual script is taken from the official documentation.This is set to
false
by default to avoid unexpected behavior for existing deployments. If this gets merged, we would need to update all relevant official snowplow modules, i.e. enrich, collector etc to support passing this flag from the user land – happy to do this work!An alternative implementation that I would be equally happy with would be to expose the user_supplied_script argument in the official modules to let the users append arbitrary setup scripts such as this.
Why is this needed
We lack the basic monitoring capabilities that are only available when the Cloud Ops Agent is installed (disk, memory and CPU monitoring). We tried to install this without messing with the terraform configuration by using Ops Agent Policies, but apparently they only work when the Ops Config Agents are installed, which can be limiting for some teams.