Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/logstash/inputs/snmp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ def register
version = host["version"] || "2c"
raise(LogStash::ConfigurationError, "only protocol version '1', '2c' and '3' are supported for host option '#{host_name}'") unless version =~ VERSION_REGEX

retries = host["retries"] || 2
timeout = host["timeout"] || 1000
retries = host["retries"]&.to_i || 2
timeout = host["timeout"]&.to_i || 1000

# TODO: move these validations in a custom validator so it happens before the register method is called.
host_details = host_name.match(HOST_REGEX)
Expand Down