- 필수 기능
- 시작하기
- Glossary
- 표준 속성
- Guides
- Agent
- 통합
- 개방형텔레메트리
- 개발자
- Administrator's Guide
- API
- Datadog Mobile App
- CoScreen
- Cloudcraft
- 앱 내
- 서비스 관리
- 인프라스트럭처
- 애플리케이션 성능
- APM
- Continuous Profiler
- 스팬 시각화
- 데이터 스트림 모니터링
- 데이터 작업 모니터링
- 디지털 경험
- 소프트웨어 제공
- 보안
- AI Observability
- 로그 관리
- 관리
On macOS, the Datadog Agent is installed as a user service for the user that runs the install instructions. This allows the Datadog Agent GUI system tray application to work, if you’re logged in to the macOS GUI as the user that performed the install. The main drawback is that the Agent runs only when the user that performed the install is logged in using the macOS GUI.
Because of this, by default the Datadog Agent doesn’t run in cases where no GUI access to the macOS host is available. Additional steps are therefore required when installing and running the macOS Datadog Agent with no GUI access.
Connect to the host and follow the Agent installation instructions to install the macOS Datadog Agent.
As the user that ran the install, execute the following bash script:
#!/bin/bash
echo "Moving the Datadog Agent service for the $USER user to a system service"
# Move the per-user service definition installed by the Agent to a system service
sudo mv /Users/$USER/Library/LaunchAgents/com.datadoghq.agent.plist /Library/LaunchDaemons/com.datadoghq.agent.plist
echo "Setting the Datadog Agent service to run as the $USER user"
# By default, system services run as root.
# This plist file modification is needed to make the Agent not run as root, but as the current user.
sudo plutil -insert UserName -string "$USER" /Library/LaunchDaemons/com.datadoghq.agent.plist
echo "Setting permissions on the Datadog Agent service file"
# Put the correct permissions on the plist file.
# Otherwise launchctl will refuse running commands for this service.
sudo chown root:staff /Library/LaunchDaemons/com.datadoghq.agent.plist
echo "Enabling the Datadog Agent service"
# Enable the service: makes sure it runs on reboot
sudo launchctl enable system/com.datadoghq.agent
echo "Loading & launching the Datadog Agent service"
# Load the service: this starts the Agent
sudo launchctl load /Library/LaunchDaemons/com.datadoghq.agent.plist
This script reconfigures the Datadog Agent service to run as a launch daemon, with the following properties:
The Datadog Agent service is managed with launchctl
. After the above installation instructions have been run, manage the Agent service with the following commands:
Description | Command |
---|---|
Start Agent service | sudo launchctl start com.datadoghq.agent |
Stop Agent running service | sudo launchctl stop com.datadoghq.agent |
Status of Agent service | sudo launchctl list com.datadoghq.agent |
Disable Agent service | sudo launchctl disable system/com.datadoghq.agent |
Enable Agent service | sudo launchctl enable system/com.datadoghq.agent && sudo launchctl load /Library/LaunchDaemons/com.datadoghq.agent.plist |
Disabling the Agent prevents the list
, start
, and stop
commands from working, and prevents the Agent service from being started on reboot.