Skip to content

Commit 4b99a5f

Browse files
committed
Added support for V3
Added support for version 3. All the existing issues with v1 and v2c are also with v3 e.g. #679 snmp walker will not return more than 1000 objects, all following objects cannot be accessed Incorrect encryption (privacy) passphrase gives a timeout and not an error (protocol limitation?) Incorrect community string gives a timeout and not an error (protocol limitation?) Changes to the node are made with following details: Node-red v1.2.2 Node.js v12.6.0 Windows_NT 10.0.19841 x64 LE
1 parent 8f2c631 commit 4b99a5f

4 files changed

Lines changed: 540 additions & 74 deletions

File tree

io/snmp/README.md

Lines changed: 71 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,28 @@ Usage
1818

1919
SNMP oids fetcher. Can fetch a single or comma separated list of oids. Triggered by any input.
2020

21-
`msg.host` may contain the host.
21+
`msg.host` may contain the host including the port.
2222

23-
`msg.community` may contain the community.
23+
`msg.community` may contain the community. (v1 and v2c only)
24+
25+
`msg.username` may contain the username. (v3 only)
26+
27+
`msg.authkey` may contain the digest security key. (v3 only)
28+
29+
`msg.privkey` may contain the encryption security key. (v3 only)
2430

2531
`msg.oid` may contain a comma separated list of oids to search for. (no spaces)
2632

2733
The host configured in the edit config will override `msg.host`. Leave blank if you want to use `msg.host` to provide input.
2834

2935
The community configured in the edit config will override `msg.community`. Leave blank if you want to use `msg.community` to provide input.
3036

37+
The username configured in the edit config will override `msg.username`. Leave blank if you want to use `msg.username` to provide input.
38+
39+
The digest security key configured in the edit config will override `msg.authkey`. Leave blank if you want to use `msg.authkey` to provide input.
40+
41+
The encryption security key configured in the edit config will override `msg.privkey`. Leave blank if you want to use `msg.privkey` to provide input.
42+
3143
The oids configured in the edit config will override `msg.oid`. Leave blank if you
3244
want to use `msg.oid` to provide input.
3345

@@ -38,9 +50,15 @@ Values depends on the oids being requested.
3850

3951
SNMP sets the value of one or more OIDs.
4052

41-
`msg.host` may contain the host.
53+
`msg.host` may contain the host including the port.
54+
55+
`msg.community` may contain the community. (v1 and v2c only)
56+
57+
`msg.username` may contain the username. (v3 only)
4258

43-
`msg.community` may contain the community.
59+
`msg.authkey` may contain the digest security key. (v3 only)
60+
61+
`msg.privkey` may contain the encryption security key. (v3 only)
4462

4563
`msg.varbinds` may contain an array of varbind JSON objects e.g.:
4664
```
@@ -81,6 +99,12 @@ The host configured in the edit config will override `msg.host`. Leave blank if
8199

82100
The community configured in the edit config will override `msg.community`. Leave blank if you want to use `msg.community` to provide input.
83101

102+
The username configured in the edit config will override `msg.username`. Leave blank if you want to use `msg.username` to provide input.
103+
104+
The digest security key configured in the edit config will override `msg.authkey`. Leave blank if you want to use `msg.authkey` to provide input.
105+
106+
The encryption security key configured in the edit config will override `msg.privkey`. Leave blank if you want to use `msg.privkey` to provide input.
107+
84108
The varbinds configured in the edit config will override `msg.varbinds`. Leave blank if you want to use `msg.varbinds` to provide input.
85109

86110

@@ -89,16 +113,28 @@ The varbinds configured in the edit config will override `msg.varbinds`. Leave b
89113

90114
Simple SNMP table oid fetcher. Triggered by any input.
91115

92-
`msg.host` may contain the host.
116+
`msg.host` may contain the host including the port.
93117

94-
`msg.community` may contain the community.
118+
`msg.community` may contain the community. (v1 and v2c only)
95119

96-
`msg.oid` may contain the oid of a single table to search for.
120+
`msg.username` may contain the username. (v3 only)
121+
122+
`msg.authkey` may contain the digest security key. (v3 only)
123+
124+
`msg.privkey` may contain the encryption security key. (v3 only)
125+
126+
`msg.oid` may contain a comma separated list of oids to search for. (no spaces)
97127

98128
The host configured in the edit config will override `msg.host`. Leave blank if you want to use `msg.host` to provide input.
99129

100130
The community configured in the edit config will override `msg.community`. Leave blank if you want to use `msg.community` to provide input.
101131

132+
The username configured in the edit config will override `msg.username`. Leave blank if you want to use `msg.username` to provide input.
133+
134+
The digest security key configured in the edit config will override `msg.authkey`. Leave blank if you want to use `msg.authkey` to provide input.
135+
136+
The encryption security key configured in the edit config will override `msg.privkey`. Leave blank if you want to use `msg.privkey` to provide input.
137+
102138
The oid configured in the edit config will override `msg.oid`. Leave blank if you
103139
want to use `msg.oid` to provide input.
104140

@@ -109,16 +145,28 @@ Values depends on the oids being requested.
109145

110146
Simple SNMP oid subtree fetcher. Triggered by any input. Reads from OID specified and any below it.
111147

112-
`msg.host` may contain the host.
148+
`msg.host` may contain the host including the port.
113149

114-
`msg.community` may contain the community.
150+
`msg.community` may contain the community. (v1 and v2c only)
151+
152+
`msg.username` may contain the username. (v3 only)
153+
154+
`msg.authkey` may contain the digest security key. (v3 only)
155+
156+
`msg.privkey` may contain the encryption security key. (v3 only)
115157

116158
`msg.oid` may contain the oid of a single table to search for.
117159

118160
The host configured in the edit config will override `msg.host`. Leave blank if you want to use `msg.host` to provide input.
119161

120162
The community configured in the edit config will override `msg.community`. Leave blank if you want to use `msg.community` to provide input.
121163

164+
The username configured in the edit config will override `msg.username`. Leave blank if you want to use `msg.username` to provide input.
165+
166+
The digest security key configured in the edit config will override `msg.authkey`. Leave blank if you want to use `msg.authkey` to provide input.
167+
168+
The encryption security key configured in the edit config will override `msg.privkey`. Leave blank if you want to use `msg.privkey` to provide input.
169+
122170
The oid configured in the edit config will override `msg.oid`. Leave blank if you
123171
want to use `msg.oid` to provide input.
124172

@@ -129,16 +177,28 @@ Values depends on the oids being requested.
129177

130178
Simple SNMP oid walker fetcher. Triggered by any input. Reads from OID specified to the end of the table.
131179

132-
`msg.host` may contain the host.
180+
`msg.host` may contain the host including the port.
181+
182+
`msg.community` may contain the community. (v1 and v2c only)
183+
184+
`msg.username` may contain the username. (v3 only)
133185

134-
`msg.community` may contain the community.
186+
`msg.authkey` may contain the digest security key. (v3 only)
187+
188+
`msg.privkey` may contain the encryption security key. (v3 only)
135189

136190
`msg.oid` may contain the oid of a single table to search for.
137191

138192
The host configured in the edit config will override `msg.host`. Leave blank if you want to use `msg.host` to provide input.
139193

140194
The community configured in the edit config will override `msg.community`. Leave blank if you want to use `msg.community` to provide input.
141195

196+
The username configured in the edit config will override `msg.username`. Leave blank if you want to use `msg.username` to provide input.
197+
198+
The digest security key configured in the edit config will override `msg.authkey`. Leave blank if you want to use `msg.authkey` to provide input.
199+
200+
The encryption security key configured in the edit config will override `msg.privkey`. Leave blank if you want to use `msg.privkey` to provide input.
201+
142202
The oid configured in the edit config will override `msg.oid`. Leave blank if you
143203
want to use `msg.oid` to provide input.
144204

io/snmp/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"name" : "node-red-node-snmp",
3-
"version" : "0.0.25",
3+
"version" : "0.0.26",
44
"description" : "A Node-RED node that looks for SNMP oids.",
55
"dependencies" : {
6-
"net-snmp" : "1.2.4"
6+
"net-snmp" : "2.9.6"
77
},
88
"repository" : {
99
"type":"git",
@@ -23,6 +23,7 @@
2323
},
2424
"contributors": [
2525
{ "name": "Mika Karaila" },
26-
{ "name": "Bryan Malyn" }
26+
{ "name": "Bryan Malyn" },
27+
{ "name": "Andres" }
2728
]
2829
}

0 commit comments

Comments
 (0)