logstash-integration-snmp 4.3.1-java → 4.4.0-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/VERSION +1 -1
- data/docs/input-snmp.asciidoc +27 -0
- data/lib/logstash/inputs/snmp.rb +13 -0
- data/lib/logstash-integration-snmp_jars.rb +1 -1
- data/vendor/jar-dependencies/org/logstash/integrations/plugin/{4.3.1/plugin-4.3.1.jar → 4.4.0/plugin-4.4.0.jar} +0 -0
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2a79607b130f6d5e1b16fa3979be1cddad462aae22e58a481888a35bebbb0c09
|
|
4
|
+
data.tar.gz: 17add7304deab345d2e8b77d58e95835749ccd4c710176aa3b89aedca27578ac
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 22fee9ee3c1b9bcf88682db9fe6ed721c1cb01e46adaacf98e953fe015ef1ff0848b03e0340d0cd26b2e171ace49c9f1d61853de92b41518c89a2cbb2b6a849e
|
|
7
|
+
data.tar.gz: f94e7f9442e9d3078e2bc519b37e413640081137af6911c8ca114f1b366df86054164c4ec192e924d8add40e5b0fc56f56007f8fd1ae21752729e90e29b396ca
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
## 4.4.0
|
|
2
|
+
- Expose `max_repetitions` config option to the SNMP input plugin, allowing users to control the max-repetitions field in GETBULK PDUs used by walk and table operations. [#97](https://github.com/logstash-plugins/logstash-integration-snmp/pull/97)
|
|
3
|
+
|
|
1
4
|
## 4.3.1
|
|
2
5
|
- Fix: generate error events with _snmpfailure tag when all SNMP operations fail and the response data is empty (e.g., timeout) [#92](https://github.com/logstash-plugins/logstash-integration-snmp/pull/92)
|
|
3
6
|
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
4.
|
|
1
|
+
4.4.0
|
data/docs/input-snmp.asciidoc
CHANGED
|
@@ -78,6 +78,7 @@ This plugin supports the following configuration options plus the <<plugins-{typ
|
|
|
78
78
|
| <<plugins-{type}s-{plugin}-allow_partial_response>> |<<boolean,boolean>>|No
|
|
79
79
|
| <<plugins-{type}s-{plugin}-interval>> |<<number,number>>|No
|
|
80
80
|
| <<plugins-{type}s-{plugin}-local_engine_id>> |<<string,string>>|No
|
|
81
|
+
| <<plugins-{type}s-{plugin}-max_repetitions>> |<<number,number>>|No
|
|
81
82
|
| <<plugins-{type}s-{plugin}-mib_paths>> |<<path,path>>|No
|
|
82
83
|
| <<plugins-{type}s-{plugin}-oid_mapping_format>> |<<string,string>>, one of `["default", "ruby_snmp", "dotted_string"]`|No
|
|
83
84
|
| <<plugins-{type}s-{plugin}-oid_map_field_values>> |<<boolean,boolean>>|No
|
|
@@ -217,6 +218,32 @@ If polling all configured hosts takes longer than this interval, a warning will
|
|
|
217
218
|
The SNMPv3 local engine ID. Its length must be greater or equal than 5 and less or equal than 32.
|
|
218
219
|
If not provided, a default ID is generated based on the local IP address and additional four random bytes.
|
|
219
220
|
|
|
221
|
+
[id="plugins-{type}s-{plugin}-max_repetitions"]
|
|
222
|
+
===== `max_repetitions`
|
|
223
|
+
|
|
224
|
+
* Value type is <<number,number>>
|
|
225
|
+
* Default value is `10`
|
|
226
|
+
|
|
227
|
+
The `max_repetitions` option sets the max-repetitions field in GETBULK PDUs used by `walk` and `table` operations.
|
|
228
|
+
This value controls how many OID rows are returned in each GETBULK response from the SNMP agent.
|
|
229
|
+
|
|
230
|
+
A smaller value may help avoid timeouts when polling devices with large tables or limited resources.
|
|
231
|
+
A larger value can improve performance by reducing the number of round trips needed to retrieve a full table.
|
|
232
|
+
|
|
233
|
+
If not set, the SNMP4J library default of `10` is used.
|
|
234
|
+
|
|
235
|
+
Example
|
|
236
|
+
[source,ruby]
|
|
237
|
+
-----
|
|
238
|
+
input {
|
|
239
|
+
snmp {
|
|
240
|
+
walk => ["1.3.6.1.2.1.2.2"]
|
|
241
|
+
hosts => [{host => "udp:127.0.0.1/161" community => "public"}]
|
|
242
|
+
max_repetitions => 5
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
-----
|
|
246
|
+
|
|
220
247
|
[id="plugins-{type}s-{plugin}-mib_paths"]
|
|
221
248
|
===== `mib_paths`
|
|
222
249
|
|
data/lib/logstash/inputs/snmp.rb
CHANGED
|
@@ -67,6 +67,11 @@ class LogStash::Inputs::Snmp < LogStash::Inputs::Base
|
|
|
67
67
|
# Timeout in milliseconds to execute all hosts configured operations (get, walk, table).
|
|
68
68
|
config :poll_hosts_timeout, :validate => :number
|
|
69
69
|
|
|
70
|
+
# Sets the maximum number of repetitions for GETBULK requests used in `walk` and `table` operations.
|
|
71
|
+
# This controls how many rows are returned per PDU in SNMPv2c/v3 GETBULK requests.
|
|
72
|
+
# Lowering this value may help avoid timeouts when polling devices with large tables.
|
|
73
|
+
config :max_repetitions, :validate => :number, :default => 10
|
|
74
|
+
|
|
70
75
|
# Append values to the `tags` field when one or more SNMP operations fail
|
|
71
76
|
config :tag_on_failure, :validate => :array, :default => ['_snmpfailure']
|
|
72
77
|
|
|
@@ -263,6 +268,7 @@ class LogStash::Inputs::Snmp < LogStash::Inputs::Base
|
|
|
263
268
|
validate_hosts!
|
|
264
269
|
validate_tables!
|
|
265
270
|
validate_local_engine_id!
|
|
271
|
+
validate_max_repetitions!
|
|
266
272
|
end
|
|
267
273
|
|
|
268
274
|
def validate_oids!
|
|
@@ -328,6 +334,12 @@ class LogStash::Inputs::Snmp < LogStash::Inputs::Base
|
|
|
328
334
|
end
|
|
329
335
|
end
|
|
330
336
|
|
|
337
|
+
def validate_max_repetitions!
|
|
338
|
+
if @max_repetitions <= 0
|
|
339
|
+
raise(LogStash::ConfigurationError, '`max_repetitions` must be a positive integer')
|
|
340
|
+
end
|
|
341
|
+
end
|
|
342
|
+
|
|
331
343
|
def create_request_aggregator
|
|
332
344
|
SnmpClientRequestAggregator.new(@threads, 'SnmpRequestWorker')
|
|
333
345
|
end
|
|
@@ -335,6 +347,7 @@ class LogStash::Inputs::Snmp < LogStash::Inputs::Base
|
|
|
335
347
|
def build_client!(mib_manager, supported_transports, hosts_versions)
|
|
336
348
|
client_builder = org.logstash.snmp.SnmpClient.builder(mib_manager, supported_transports)
|
|
337
349
|
client_builder.setLocalEngineId(@local_engine_id) unless @local_engine_id.nil?
|
|
350
|
+
client_builder.setMaxRepetitions(@max_repetitions)
|
|
338
351
|
|
|
339
352
|
build_snmp_client!(client_builder, validate_usm_user: hosts_versions.include?('3'))
|
|
340
353
|
end
|
|
@@ -4,4 +4,4 @@ require 'jar_dependencies'
|
|
|
4
4
|
require_jar('org.snmp4j', 'snmp4j-log4j', '2.8.11')
|
|
5
5
|
require_jar('org.snmp4j', 'snmp4j', '3.8.0')
|
|
6
6
|
require_jar('org.snakeyaml', 'snakeyaml-engine', '2.7')
|
|
7
|
-
require_jar('org.logstash.integrations', 'plugin', '4.
|
|
7
|
+
require_jar('org.logstash.integrations', 'plugin', '4.4.0')
|
|
Binary file
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: logstash-integration-snmp
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.
|
|
4
|
+
version: 4.4.0
|
|
5
5
|
platform: java
|
|
6
6
|
authors:
|
|
7
7
|
- Elastic
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2026-05
|
|
10
|
+
date: 2026-08-05 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: logstash-core-plugin-api
|
|
@@ -468,7 +468,7 @@ files:
|
|
|
468
468
|
- spec/unit/inputs/common_spec.rb
|
|
469
469
|
- spec/unit/inputs/snmp_spec.rb
|
|
470
470
|
- spec/unit/inputs/snmptrap_spec.rb
|
|
471
|
-
- vendor/jar-dependencies/org/logstash/integrations/plugin/4.
|
|
471
|
+
- vendor/jar-dependencies/org/logstash/integrations/plugin/4.4.0/plugin-4.4.0.jar
|
|
472
472
|
- vendor/jar-dependencies/org/snakeyaml/snakeyaml-engine/2.7/snakeyaml-engine-2.7.jar
|
|
473
473
|
- vendor/jar-dependencies/org/snmp4j/snmp4j-log4j/2.8.11/snmp4j-log4j-2.8.11.jar
|
|
474
474
|
- vendor/jar-dependencies/org/snmp4j/snmp4j/3.8.0/snmp4j-3.8.0.jar
|