Overview
This page outlines the basic features of the Datadog Agent for macOS. See the Supported Platforms documentation for the complete list of supported macOS distributions and versions.
Install the Agent
To install the Agent on macOS, follow the in-app instructions in Fleet Automation, and run the generated script on your hosts.
The Agent is installed in a sandbox located at /opt/datadog-agent. For any additional monitoring, make sure to give the Agent user _dd-agent access to the files or directories.
Commands
The launchctl service manager controls the Agent lifecycle, while other commands can be executed through the Agent binary, systray app, or web GUI.
| Description | Command |
|---|
| Start Agent as a service | sudo launchctl kickstart system/com.datadoghq.agent |
| Stop Agent running as a service | sudo launchctl kill SIGTERM system/com.datadoghq.agent |
| Restart Agent running as a service | sudo launchctl kickstart -k system/com.datadoghq.agent |
| Status of Agent service | sudo launchctl print system/com.datadoghq.agent |
| Status page of running Agent | sudo datadog-agent status or web GUI |
| Send flare | sudo datadog-agent flare or web GUI |
| Display command usage | datadog-agent --help |
| Run a check | sudo datadog-agent check <CHECK_NAME> |
Configuration
The Datadog Agent configuration file is located in /opt/datadog-agent. This YAML file holds the host-wide connection details used to send data to Datadog including:
api_key: your organization’s Datadog API keysite: target Datadog region (for example datadoghq.com, datadoghq.eu, ddog-gov.com, us2.ddog-gov.com)proxy: HTTP/HTTPS proxy endpoints for outbound traffic (see Datadog Agent Proxy Configuration)- Default tags, log levels, and Datadog configurations.
A fully commented reference file, located in /opt/datadog-agent/etc/datadog.yaml.example, lists every available option for comparison or copy-paste. Alternatively, see the sample config_template.yaml file for all available configuration options.
Integration files
Configuration files for integrations are found in /opt/datadog-agent/etc/conf.d/. Each integration has its own sub-directory, <INTEGRATION>.d/, which contains:
conf.yaml: the active configuration controlling how the integration gathers metrics and logsconf.yaml.example: a sample illustrating supported keys and defaults
Uninstall the Agent
To uninstall the Agent, run the following script:
curl -L https://install.datadoghq.com/scripts/uninstall_mac_os.sh | bash
Troubleshooting
See the Agent Troubleshooting documentation for troubleshooting steps.
Working with the embedded Agent
The Agent contains an embedded Python environment at /opt/datadog-agent/embedded/. Common binaries such as python and pip are contained within /opt/datadog-agent/embedded/bin/.
See the instructions on how to add packages to the embedded Agent for more information.
Further Reading
Additional helpful documentation, links, and articles: