Just a walkthrough of the containerized way to get NAS stats to Datadog.
The tl;dr is the container can monitor the host, processes, grab logs and SNMP. If you're using your NAS as a quick dev box you could also monitor other containers.
SSH to your Synology NAS, edit YOURENV
and YOURAPIKEY
, in the following (found in synology_dd_install.sh)
then run it via:
vi synolog_dd_install.sh
!#/usr/bin/env bash
DOCKER_CONTENT_TRUST=1 docker run -d \
--name dsm-datadog \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
-v /proc/:/host/proc/:ro \
-v /sys/fs/cgroup/:/host/sys/fs/cgroup:ro \
-v /sys/kernel/debug:/sys/kernel/debug \
-e DD_API_KEY="YOURAPIKEY" \
-e DD_ENV="YOURENV" \
-e DD_APM_ENABLED=false \
-e DD_APM_NON_LOCAL_TRAFFIC=true \
-e DD_PROCESS_AGENT_ENABLED=true \
-e DD_LOGS_ENABLED=true \
-e DD_LOGS_CONFIG_CONTAINER_COLLECT_ALL=true \
--security-opt apparmor:unconfined \
--privileged \
--restart unless-stopped \
datadog/agent:latest
Set the file as executable:
chmod +x synolog_dd_install.sh
Run it: ./synolog_dd_install.sh
Check the containers page under infrastructure in Datadog!
SSH to your Lockerstor NAS, edit YOURENV
and YOURAPIKEY
, in the following (found in lockerstor_dd_install.sh)
then run it via:
vi synolog_dd_install.sh
!#/usr/bin/env sh
DOCKER_CONTENT_TRUST=1 docker run -d \
--name adm-datadog \
-e DD_SYSTEM_PROBE_ENABLED=true \
-e DD_PROCESS_AGENT_ENABLED=true \
-e DD_API_KEY="${DD_API}" \
-e DD_ENV="${DD_ENV}" \
-e DD_APM_ENABLED=false \
-e DD_APM_NON_LOCAL_TRAFFIC=true \
-e DD_PROCESS_AGENT_ENABLED=true \
-e DD_LOGS_ENABLED=true \
-e DD_LOGS_CONFIG_CONTAINER_COLLECT_ALL=true \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
-v /proc/:/host/proc/:ro \
-v /sys/fs/cgroup/:/host/sys/fs/cgroup:ro \
-v /sys/kernel/debug:/sys/kernel/debug \
--security-opt apparmor:unconfined \
--cap-add=SYS_ADMIN \
--cap-add=SYS_RESOURCE \
--cap-add=SYS_PTRACE \
--cap-add=NET_ADMIN \
--cap-add=NET_BROADCAST \
--cap-add=NET_RAW \
--cap-add=IPC_LOCK \
--cap-add=CHOWN \
--privileged \
--restart unless-stopped \
datadog/agent:latest
Set the file as executable:
chmod +x synolog_dd_install.sh
Run it: ./synolog_dd_install.sh
Check the containers page under infrastructure in Datadog!
- Datadog Docker agent documentation
- Datadog Docker Network agent documentation
- Datadog Docker Logging documentation
If you're on a NAS with an Atom single or dual core, changing DD_CHECK_RUNNERS
to one or two runners will do less at once, but if you have many checks may also lag.
Per docs at the time of writing:
The Agent runs all checks concurrently by default (default value = 4 runners). To run the checks sequentially, set the value to 1. If you need to run a high number of checks (or slow checks) the collector-queue component might fall behind and fail the healthcheck. You can increase the number of runners to run checks in parallel.
Ideally I'd have a QuTS-enabled NAS to try this on - if you've got one I'd love to help test!