From 558ae6abd389e18a8af3e6d10506e1d85bcec88a Mon Sep 17 00:00:00 2001 From: SG Date: Tue, 13 Feb 2024 13:43:25 -0700 Subject: [PATCH] work in progress for idaholab/Malcolm#393, fuzzy matching for manufacturers based on OUI to NetBox list is not very good --- logstash/ruby/netbox_enrich.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/logstash/ruby/netbox_enrich.rb b/logstash/ruby/netbox_enrich.rb index 699377967..24ea08009 100644 --- a/logstash/ruby/netbox_enrich.rb +++ b/logstash/ruby/netbox_enrich.rb @@ -252,11 +252,11 @@ def filter(event) _autopopulate_default_role = (@default_role.nil? || @default_role.empty?) ? "Unspecified" : @default_role _autopopulate_default_dtype = (@default_dtype.nil? || @default_dtype.empty?) ? "Unspecified" : @default_dtype _autopopulate_default_site = (@lookup_site.nil? || @lookup_site.empty?) ? "default" : @lookup_site - _autopopulate_fuzzy_threshold = @autopopulate_fuzzy_threshold - _autopopulate_create_manuf = @autopopulate_create_manuf && !_autopopulate_oui.nil? && !_autopopulate_oui.empty? _autopopulate_hostname = event.get("#{@source_hostname}") _autopopulate_mac = event.get("#{@source_mac}") _autopopulate_oui = event.get("#{@source_oui}") + _autopopulate_fuzzy_threshold = @autopopulate_fuzzy_threshold + _autopopulate_create_manuf = @autopopulate_create_manuf && !_autopopulate_oui.nil? && !_autopopulate_oui.empty? _result = @cache_hash.getset(_lookup_type){ LruRedux::TTL::ThreadSafeCache.new(_cache_size, _cache_ttl)