Skip to content

Instantly share code, notes, and snippets.

@degemer
Last active August 29, 2015 14:15
Show Gist options
  • Save degemer/5f89f9c98633cf1ff6d1 to your computer and use it in GitHub Desktop.
Save degemer/5f89f9c98633cf1ff6d1 to your computer and use it in GitHub Desktop.
Install datadog agent using dmg package (alpha version)

Note: this is still an alpha version, and will probably change before release.

Installing the agent

Since it is not a definitive release, this package is not signed. To install it, you have to accept packages from external sources: go to Apple menu > System Preferences… > Security & Privacy > General tab and under the header "Allow applications downloaded from:", select Anywhere. For more details, check the official documentation, under Click here for more details.

Script install

Run this command (replace the api_key by your api_key available at https://app.datadoghq.com/account/settings#api) :

DD_API_KEY=your_api_key bash -c "$(curl -L https://raw.githubusercontent.com/DataDog/dd-agent/534f6e7d92200601feb8c41c71af1fcf61913d4c/packaging/osx/install.sh)"

Manual install (USE IT ONLY IF THE SCRIPT FAILS)

  • Download the dmg here.
  • Open the dmg file.
  • Double-click on datadog-agent.pkg.
  • Accept our License, and confirm the install.

Datadog agent is not yet configured and thus cannot run.

DD_API_KEY=your_api_key bash -c 'sed "s/api_key:.*/api_key: $DD_API_KEY/" /etc/dd-agent/datadog.conf.example | sudo tee /etc/dd-agent/datadog.conf > /dev/null'

You are all set, and ready to use the agent!

Using the agent

To start the agent (it is already started if you used the script), just run sudo datadog-agent start.

You can also use all the other commands by running sudo datadog-agent command.

Uninstalling the agent

Warning: It will delete every trace of datadog agent.

Just run:

sudo datadog-agent stop && sudo rm -rf /var/log/datadog /etc/dd-agent /opt/datadog-agent /usr/bin/datadog-agent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment