From bf284148ceeb8c20d5413e12fd87b97a241a9611 Mon Sep 17 00:00:00 2001 From: SG Date: Tue, 13 Feb 2024 14:32:17 -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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/logstash/ruby/netbox_enrich.rb b/logstash/ruby/netbox_enrich.rb index 24ea08009..77cd68480 100644 --- a/logstash/ruby/netbox_enrich.rb +++ b/logstash/ruby/netbox_enrich.rb @@ -209,9 +209,10 @@ def register(params) # used for massaging OUI/manufacturer names for matching @name_cleaning_patterns = [ /\ba[sbg]\b/, - /\bbeijing\b/, + /\b(beijing|shenzhen)\b/, /\bbv\b/, /\bco(rp(oration|orate)?)?\b/, + /\b(computer|network|electronic|solution|system)s?\b/, /\bglobal\b/, /\bgmbh\b/, /\binc(orporated)?\b/, @@ -225,8 +226,7 @@ def register(params) /\boo\b/, /\bsa\b/, /\bsr[ol]s?\b/, - /\bshenzhen\b/, - /\bsystems?\b/ ] + /\btech(nolog(y|ie|iya)s?)?\b/ ] end def filter(event)