This repository is essentially deprecated, as the best way to install the agent on a Raspberry Pi now is to simply use offical Datadog Ansible role and specify:
datadog_agent_flavor: "datadog-iot-agent"
The installation of Datadog agent on a Raspberry Pi is possible and well explained in that post. However this might be a bit too manual and time consuming, which is why I decided to create that Ansible role to facilitate tedious work.
Installation process follow this order:
- Install dependencies
libpython2.7-dev
andsysstat
- Verify agent is installed and if not proceed to installation
- Setup startup command in /etc/rc.local
- Launch Datadog agent
datadog_api_key
: Your Datadog API key, found here. No default value!datadog_agent_home
: The directory to install the agent to. Default: /opt/datadog-agentdatadog_log_file
: Override the logging file path. Default: /var/log/datadog-agent.logdatadog_skip_integrations
: Tell installation script to skip integrations installation, values: 1 to skip, 0 to install. Default: 1datadog_hostname
(optional): Override the hostname reported to Datadog
- hosts: servers
roles:
- { role: ansible-datadog-raspberrypi, become: yes, datadog_api_key: "123456" }
---
- hosts: servers
roles:
- { role: ansible-datadog-raspberrypi, become: yes }
vars:
datadog_api_key: "123456"
datadog_agent_home: "/home/pi/datadog-agent"
datadog_skip_integrations: 1
datadog_log_file: "/home/pi/datadog-agent/logs"
datadog_hostname: "myraspberrypi"
Contributions very welcome! If you notice any issue or room for improvement, do not hesitate to open an issue or submit a pull request.