Skip to content

Instantly share code, notes, and snippets.

@timothybasanov
Last active July 18, 2018 06:04
Show Gist options
  • Save timothybasanov/3bc39e4a06f2f1ed118fe3a244ddb003 to your computer and use it in GitHub Desktop.
Save timothybasanov/3bc39e4a06f2f1ed118fe3a244ddb003 to your computer and use it in GitHub Desktop.
DataDog agent Dockerized
/dd-api-key.env
/conf.d/

DataDog configs

Instructions:

  1. git clone https://gist.github.com/3bc39e4a06f2f1ed118fe3a244ddb003.git datadog
  2. cd datadog
  3. echo DD_API_KEY=<your key> > dd-api-key.env
init_config:
# - mibs_folder: /path/to/your/additional/mibs
instances:
- ip_address: gateway.home.timothybasanov.com
port: 161
community_string: public
# snmp_version: 1 # set to 1 if your devices use SNMP v1; no need to set otherwise, the default is 2
timeout: 1 # in seconds; default is 1
retries: 5
# enforce_mib_constraints: false # set to false to NOT verify that returned values meet MIB constraints; default is true
metrics:
# - MIB: UDP-MIB
# symbols:
# - udpInDatagrams
# - udpOutDiagrams
- OID: 1.3.6.1.2.1.6.5
name: tcpPassiveOpens
- MIB: IF-MIB
table: ifTable
symbols:
- ifInOctets
- ifOutOctets
- ifInDiscards
- ifOutDiscards
metric_tags:
- tag: interface
column: ifDescr
version: "3"
services:
datadog:
build: .
restart: always
env_file:
- dd-api-key.env
environment:
# - DD_PROCESS_AGENT_ENABLED=true
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /proc/:/host/proc/:ro
- /sys/fs/cgroup:/host/sys/fs/cgroup:ro
- /etc/passwd:/etc/passwd:ro
FROM datadog/agent
ADD conf.d-snmp.d-conf.yaml /etc/datadog-agent/conf.d/snmp.d/conf.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment