Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@ryanmaclean
Last active May 3, 2021 22:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryanmaclean/60fd7c64309f0232e7bc444162861017 to your computer and use it in GitHub Desktop.
Save ryanmaclean/60fd7c64309f0232e7bc444162861017 to your computer and use it in GitHub Desktop.
Volumio Datadog Agent Install ARM32 ARMHF
#!/usr/bin/env bash
# Add Fonz's Repo - steps to follow for your own recompile:
# https://www.fonz.net/blog/archives/2020/06/19/datadog-v7-on-raspberry-pi2/
echo 'deb http://apt.fonz.net datadog-arm main' >> /etc/apt/sources.list
# Run an apt update to grab the newly added source
apt update
# Add the cert key, this would apply to your in-house repo (ID AT THE END WILL BE DIFFERENT)
apt-key adv --keyserver hkp://pool.sks-keyservers.net:80 --recv-keys 4ACF16AF0B8F755C
# Finally, install Datadog and enable logs, process agent, APM (comment the lines not needed)
DD_AGENT_MAJOR_VERSION=7 \
DD_LOGS_ENABLED=true \
DD_PROCESS_AGENT_ENABLED=true \
DD_APM_ENABLED=true \
DD_SITE="datadoghq.com" \
DD_API_KEY="" \
bash -c "$(curl -L https://s3.amazonaws.com/dd-agent/scripts/install_script.sh)"
usermod -a -G systemd-journal dd-agent
# Journald config, works with newer versions
mkdir -p /etc/datadog-agent/conf.d/journal.d
cat <<'EOF' >> /etc/datadog-agent/conf.d/conf.yaml
logs:
- type: journald
path: /var/log/journal/
EOF
# Volumio Logs Config, Works with older versions
mkdir -p /etc/datadog-agent/conf.d/volumio.d
cat <<'EOF' >> /etc/datadog-agent/conf.d/volumio.d/conf.yaml
logs:
- type: file
path: "/var/log/volumio.log"
service: "volumio2"
source: "volumio2"
log_processing_rules:
- type: multi_line
name: new_log_start_with_date
pattern: \d{4}\-(0?[1-9]|1[012])\-(0?[1-9]|[12][0-9]|3[01])
EOF
systemctl restart datadog-agent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment