diff --git a/omnibus/config/projects/agent.rb b/omnibus/config/projects/agent.rb index 94d3c9adab84cc..20a8622f81cf3b 100644 --- a/omnibus/config/projects/agent.rb +++ b/omnibus/config/projects/agent.rb @@ -254,6 +254,9 @@ dependency 'datadog-security-agent-policies' end +# Include traps db file in snmp.d/traps_db/ +dependency 'snmp-traps' + # External agents dependency 'jmxfetch' diff --git a/omnibus/config/software/snmp-traps.rb b/omnibus/config/software/snmp-traps.rb new file mode 100644 index 00000000000000..4865a88b18ffe2 --- /dev/null +++ b/omnibus/config/software/snmp-traps.rb @@ -0,0 +1,18 @@ +name "snmp-traps" +default_version "0.2.0" + +source :url => "https://s3.amazonaws.com/dd-agent-omnibus/snmp_traps_db/dd_traps_db-#{version}.json.gz", + :sha256 => "dd308ba8ec1453ed73d60e9b8d4c38050371fdceaab4404448e1084d628d3298", + :target_filename => "dd_traps_db.json.gz" + + +build do + # The dir for confs + if osx? + traps_db_dir = "#{install_dir}/etc/conf.d/snmp.d/traps_db" + else + traps_db_dir = "#{install_dir}/etc/datadog-agent/conf.d/snmp.d/traps_db" + end + mkdir traps_db_dir + copy "dd_traps_db.json.gz", "#{traps_db_dir}/dd_traps_db.json.gz" +end diff --git a/releasenotes/notes/SNMP---include-traps-db-7c44bd129daf7667.yaml b/releasenotes/notes/SNMP---include-traps-db-7c44bd129daf7667.yaml new file mode 100644 index 00000000000000..8aa0bf9be04198 --- /dev/null +++ b/releasenotes/notes/SNMP---include-traps-db-7c44bd129daf7667.yaml @@ -0,0 +1,11 @@ +# Each section from every release note are combined when the +# CHANGELOG.rst is rendered. So the text needs to be worded so that +# it does not depend on any information only available in another +# section. This may mean repeating some details, but each section +# must be readable independently of the other. +# +# Each section note must be formatted as reStructuredText. +--- +other: + - | + Include pre-generated trap db file in the ``conf.d/snmp.d/traps_db/`` folder.