homebrew-cask/Casks/datadog-agent.rb

31 lines
1.0 KiB
Ruby

cask 'datadog-agent' do
version '5.11.3-1'
sha256 'f4dbf1a5f96a66725d4f033c54d13cdfca8c18376b31a8888e37c1deb838d7e7'
# s3.amazonaws.com/dd-agent was verified as official when first introduced to the cask
url 'https://s3.amazonaws.com/dd-agent/datadogagent.dmg'
name 'Datadog Agent'
homepage 'https://www.datadoghq.com/'
pkg "datadog-agent-#{version}.pkg"
preflight do
require 'etc'
File.open('/tmp/datadog-install-user', 'w') { |f| f.write(Etc.getlogin) }
end
uninstall pkgutil: 'com.datadoghq.agent'
zap delete: '/opt/datadog-agent'
caveats <<-EOS.undent
You will need to update /opt/datadog-agent/etc/datadog.conf and replace APIKEY with your api key
If you ever want to start/stop the Agent, please use the Datadog Agent App or datadog-agent command.
It will start automatically at login, if you want to enable it at startup, run these commands:
sudo cp '/opt/datadog-agent/etc/com.datadoghq.agent.plist' /Library/LaunchDaemons
sudo launchctl load -w /Library/LaunchDaemons/com.datadoghq.agent.plist
EOS
end