1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
7 **SNMPTRAP** configuration is controlled via a single JSON 'transaction'.
8 This transaction can be:
10 - a reply from config binding services
12 - a locally hosted JSON file
14 The format of this message is described in the SNMPTRAP package, under:
16 ``<base install dir>/spec/snmptrap-collector-component-spec.json``
18 There should also be a template JSON file with example/default values found at:
20 ``<base install dir>/etc/snmptrapd.json``
22 If you are going to use a local file, the env variable below must be defined before SNMPTRAP runs. There is a default value set in the SNMPTRAP startup script (bin/snmptrapd.sh):
24 ``export CBS_SIM_JSON=../etc/snmptrapd.json``
26 In either scenario, the format of the config message/transaction is the same. An example is described below.
31 The format of the JSON configuration that drives all behavior of SNMPTRAP is probably best described using an example. One can be found below:
38 "title": "ONAP SNMP Trap Receiver"
42 "ipv4_interface": "0.0.0.0",
44 "ipv6_interface": "::1",
48 "dns_cache_ttl_seconds": 60
51 "http_timeout_milliseconds": 1500,
53 "http_milliseconds_between_retries": 750,
54 "http_primary_publisher": "true",
55 "http_peer_publisher": "unavailable",
56 "max_traps_between_publishes": 10,
57 "max_milliseconds_between_publishes": 10000
59 "streams_publishes": {
60 "sec_fault_unsecure": {
61 "type": "message_router",
67 "topic_url": "http://localhost:3904/events/ONAP-COLLECTOR-SNMPTRAP"
73 "runtime_base_dir": "/opt/app/snmptrap",
77 "arriving_traps_log": "snmptrapd_arriving_traps.log",
78 "snmptrapd_diag": "snmptrapd_prog_diag.log",
79 "traps_stats_log": "snmptrapd_stats.csv",
80 "perm_status_file": "snmptrapd_status.log",
81 "eelf_base_dir": "/opt/app/snmptrap/logs",
82 "eelf_error": "error.log",
83 "eelf_debug": "debug.log",
84 "eelf_audit": "audit.log",
85 "eelf_metrics": "metrics.log",
86 "roll_frequency": "hour",
87 "minimum_severity_to_log": 2
90 "sw_interval_in_seconds": 60,
92 ".1.3.6.1.4.1.9.0.1": {
93 "sw_high_water_in_interval": 102,
94 "sw_low_water_in_interval": 7,
97 ".1.3.6.1.4.1.9.0.2": {
98 "sw_high_water_in_interval": 101,
99 "sw_low_water_in_interval": 7,
100 "category": "logonly"
102 ".1.3.6.1.4.1.9.0.3": {
103 "sw_high_water_in_interval": 102,
104 "sw_low_water_in_interval": 7,
105 "category": "logonly"
107 ".1.3.6.1.4.1.9.0.4": {
108 "sw_high_water_in_interval": 10,
109 "sw_low_water_in_interval": 3,
110 "category": "logonly"