Skip to content

Commit

Permalink
Ship SNMP Traps database (#10937)
Browse files Browse the repository at this point in the history
* Ship SNMP Traps database

* Update releasenotes/notes/SNMP---include-traps-db-7c44bd129daf7667.yaml

Co-authored-by: Alexandre Yang <[email protected]>

* Move snmp-traps dep to agent.rb

Co-authored-by: Alexandre Yang <[email protected]>
  • Loading branch information
FlorianVeaux and AlexandreYang authored Mar 29, 2022
1 parent cc93137 commit bcfa9e1
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
3 changes: 3 additions & 0 deletions omnibus/config/projects/agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,9 @@ def generate_embedded_archive(version)
dependency 'datadog-security-agent-policies'
end

# Include traps db file in snmp.d/traps_db/
dependency 'snmp-traps'

# External agents
dependency 'jmxfetch'

Expand Down
18 changes: 18 additions & 0 deletions omnibus/config/software/snmp-traps.rb
Original file line number Diff line number Diff line change
@@ -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
11 changes: 11 additions & 0 deletions releasenotes/notes/SNMP---include-traps-db-7c44bd129daf7667.yaml
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit bcfa9e1

Please sign in to comment.