2016-05-13 11:57:15 +08:00
cask 'datadog-agent' do
2019-11-06 09:49:41 +08:00
version '6.15.0-1'
sha256 'd6200456446af2e22ab5dc312bea03a3b289123cf9087a01de69fc028d051077'
2016-05-13 11:57:15 +08:00
2019-07-19 21:35:24 +08:00
# dd-agent.s3.amazonaws.com was verified as official when first introduced to the cask
url " https://dd-agent.s3.amazonaws.com/datadog-agent- #{ version } .dmg "
2018-12-07 03:34:33 +08:00
appcast 'https://github.com/DataDog/datadog-agent/releases.atom'
2016-05-13 11:57:15 +08:00
name 'Datadog Agent'
homepage 'https://www.datadoghq.com/'
2017-03-17 20:09:22 +08:00
pkg " datadog-agent- #{ version } .pkg "
2016-05-13 11:57:15 +08:00
preflight do
require 'etc'
2018-12-07 03:34:33 +08:00
File . write ( '/tmp/datadog-install-user' , Etc . getlogin )
2016-05-13 11:57:15 +08:00
end
2018-12-07 03:34:33 +08:00
uninstall launchctl : 'com.datadoghq.agent' ,
2018-12-19 02:20:33 +08:00
# pkgutil: 'com.datadoghq.agent' # this is commented out because PKG uninstallation seems to fail due to missing files caused by case insensitivity and files that differ only in case. See https://github.com/Homebrew/homebrew-cask/pull/54739.
delete : [
'/Applications/Datadog Agent.app' ,
'/opt/datadog-agent/' ,
'/private/var/db/receipts/com.datadoghq.agent.*' ,
]
2016-05-13 11:57:15 +08:00
2017-11-18 17:50:50 +08:00
zap trash : '/opt/datadog-agent'
2016-05-13 11:57:15 +08:00
2017-10-22 23:36:29 +08:00
caveats << ~ EOS
2018-11-15 23:36:56 +08:00
You will need to update / opt / datadog - agent / etc / datadog . yaml and replace APIKEY with your api key
2016-05-13 11:57:15 +08:00
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