Skip to content

Commit e0d0187

Browse files
[DOCS-8850] adding more info to SNMP traps about enabling logs (DataDog#25161)
* adding more info to SNMP traps about enabling logs * Apply suggestions from code review Co-authored-by: Heston Hoffman <heston.hoffman@datadoghq.com> * Fix formatting --------- Co-authored-by: Heston Hoffman <heston.hoffman@datadoghq.com>
1 parent 69fdbe1 commit e0d0187

File tree

2 files changed

+42
-31
lines changed

2 files changed

+42
-31
lines changed

content/en/network_monitoring/devices/snmp_traps.md

Lines changed: 42 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -17,38 +17,48 @@ Datadog Agent v7.37+ supports listening for SNMP Traps, enabling you to set up [
1717

1818
## Configuration
1919

20-
To enable listening for SNMP Traps, add the following to `datadog.yaml`:
20+
1. The SNMP Trap functionality sends data as logs to Datadog. To receive this data, ensure that log collection is enabled by adding the following configuration to your `datadog.yaml` file.
21+
22+
```yaml
23+
logs_enabled: true # Traps are forwarded as logs and can be found in the Log Explorer with a `source:snmp-traps` query.
24+
```
25+
26+
2. In addition to enabling log collection on your Agent, to enable listening for SNMP Traps, add the following to your `datadog.yaml` file:
27+
28+
```yaml
29+
network_devices:
30+
namespace: <NAMESPACE> # optional, defaults to "default".
31+
snmp_traps:
32+
enabled: true
33+
port: 9162 # on which ports to listen for traps
34+
community_strings: # which community strings to allow for v2 traps
35+
- <STRING_1>
36+
- <STRING_2>
37+
bind_host: 0.0.0.0
38+
users: # SNMP v3
39+
- user: "user"
40+
authKey: myAuthKey
41+
authProtocol: "SHA"
42+
privKey: myPrivKey
43+
privProtocol: "AES" # choices: MD5, SHA, SHA224, SHA256, SHA384, SHA512
44+
- user: "user"
45+
authKey: myAuthKey
46+
authProtocol: "MD5"
47+
privKey: myPrivKey
48+
privProtocol: "DES"
49+
- user: "user2"
50+
authKey: myAuthKey2
51+
authProtocol: "SHA"
52+
privKey: myPrivKey2
53+
privProtocol: "AES" # choices: DES, AES (128 bits), AES192, AES192C, AES256, AES256C
54+
```
55+
56+
**Note**: Multiple v3 users and passwords are supported as of Datadog Agent `7.51` or higher.
57+
58+
3. Search for `source:snmp_traps` in the [Log Explorer][5] to locate SNMP trap data:
59+
60+
{{< img src="network_device_monitoring/snmp/snmp_logs_2.png" alt="Log Explorer showing `source:snmp_traps` with an SNMP Trap log line selected, highlighting the Network Device tag" style="width:90%" >}}
2161

22-
```yaml
23-
logs_enabled: true # Traps are forwarded as logs and can be found in the Log Explorer with a `source:snmp-traps` query.
24-
network_devices:
25-
namespace: <NAMESPACE> # optional, defaults to "default".
26-
snmp_traps:
27-
enabled: true
28-
port: 9162 # on which ports to listen for traps
29-
community_strings: # which community strings to allow for v2 traps
30-
- <STRING_1>
31-
- <STRING_2>
32-
bind_host: 0.0.0.0
33-
users: # SNMP v3
34-
- user: "user"
35-
authKey: myAuthKey
36-
authProtocol: "SHA"
37-
privKey: myPrivKey
38-
privProtocol: "AES" # choices: MD5, SHA, SHA224, SHA256, SHA384, SHA512
39-
- user: "user"
40-
authKey: myAuthKey
41-
authProtocol: "MD5"
42-
privKey: myPrivKey
43-
privProtocol: "DES"
44-
- user: "user2"
45-
authKey: myAuthKey2
46-
authProtocol: "SHA"
47-
privKey: myPrivKey2
48-
privProtocol: "AES" # choices: DES, AES (128 bits), AES192, AES192C, AES256, AES256C
49-
```
50-
51-
**Note**: Multiple v3 users and passwords are supported as of Datadog Agent `7.51` or higher.
5262

5363
## Device namespaces
5464

@@ -138,3 +148,4 @@ If there are errors due to missing dependencies and you have access to the missi
138148
[2]: /network_monitoring/devices
139149
[3]: /developers/integrations/python
140150
[4]: https://pypi.org/project/pysmi/
151+
[5]: https://app.datadoghq.com/logs
666 KB
Loading

0 commit comments

Comments
 (0)