Last active
May 3, 2021 22:14
-
-
Save ryanmaclean/60fd7c64309f0232e7bc444162861017 to your computer and use it in GitHub Desktop.
Volumio Datadog Agent Install ARM32 ARMHF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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