Add RST Files for SNMPTRAP
[dcaegen2.git] / docs / sections / services / snmptrap / architecture.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3
4 Architecture
5 ============
6
7 **SNMPTRAP** (or "trapd", as in trap daemon) is a network facing ONAP platform
8 component.
9
10 The simple network management protocol (or "SNMP", for short) is a
11 standardized communication protocol used between managed devices (physical,
12 virtual - or anything in between!) and a management system.  It is used to
13 relay data that can be valuable in the operation, fault identification and
14 planning processes of all networks.
15
16 It is the "front line" of management in all environments.
17
18 SNMP utilizes a message called a "trap" to inform SNMP managers of abnormal
19 or changed conditions on a resource that is running a SNMP agent.  These
20 agents can run on physical or virtual resources (no difference in reporting)
21 and can notify on anything from hardware states, resource utilization,
22 software processes or anything else specific to the agent's environment.
23
24
25 Capabilities
26 ------------
27
28 **SNMPTRAP** receives simple network management protocol ("SNMP") traps
29 and publishes them to a  message router (DMAAP/MR) instance based on
30 attributes obtained from configuration binding service ("CBS").
31
32 .. blockdiag::
33
34    blockdiag layers {
35    orientation = portrait
36    snmp_agent_1 -> SNMPTRAP;
37    snmp_agent_2 -> SNMPTRAP;
38    snmp_agent_n -> SNMPTRAP;
39    config binding service -> SNMPTRAP;
40    SNMPTRAP -> dmaap mr;
41
42    group l1 {
43     color = orange;
44     snmp_agent_1; snmp_agent_2; snmp_agent_n;
45     }
46    group l2 {
47     color = blue;
48     SNMPTRAP;
49     }
50    group l3 {
51     color = orange;
52     dmaap mr;
53     }
54    group l4 {
55     color = gray;
56     config binding service;
57     }
58
59    }
60
61
62 Interactions
63 ------------
64
65
66 Traps are published to DMAAP/MR in a json format.  Once traps are published
67 to a DMAAP/MR instance, they are available to consumers that are
68 subscribed to the topic they were published to.
69
70
71 Usage Scenarios
72 ---------------
73
74 **SNMPTRAP** can be run on any device (physical, logical, container) that
75 is capable of running python 3.6+ and has SNMP traps targeted at it.  Running
76 an instance of **SNMPTRAP** will result in arriving traps being published
77 to the topic specified by config binding services.  If CBS is not present,
78 SNMPTRAP will look for or a JSON configuration file specified via the
79 environment vvariable CBS_SIM_JSON at startup.  Note that relative paths
80 will be located from the bin (<SNMPTRAP base directory>/bin directory. E.g.
81
82 .. code-block:: bash
83
84    CBS_SIM_JSON=../etc/snmptrapd.json
85