diff --git a/logstash/pipelines/enrichment/21_netbox.conf b/logstash/pipelines/enrichment/21_netbox.conf index f8428753d..93b53930c 100644 --- a/logstash/pipelines/enrichment/21_netbox.conf +++ b/logstash/pipelines/enrichment/21_netbox.conf @@ -202,6 +202,7 @@ filter { "target" => "[source][device]" "source_oui" => "[source][oui]" "source_mac" => "[source][mac]" + "source_hostname" => "[source][ip_reverse_dns]" "enabled_env" => "NETBOX_ENRICHMENT" "verbose_env" => "NETBOX_ENRICHMENT_VERBOSE" "lookup_site_env" => "NETBOX_DEFAULT_SITE" @@ -244,6 +245,7 @@ filter { "target" => "[destination][device]" "source_oui" => "[destination][oui]" "source_mac" => "[destination][mac]" + "source_hostname" => "[destination][ip_reverse_dns]" "enabled_env" => "NETBOX_ENRICHMENT" "verbose_env" => "NETBOX_ENRICHMENT_VERBOSE" "lookup_site_env" => "NETBOX_DEFAULT_SITE" diff --git a/logstash/ruby/netbox_enrich.rb b/logstash/ruby/netbox_enrich.rb index 5ac89f362..2984aa92e 100644 --- a/logstash/ruby/netbox_enrich.rb +++ b/logstash/ruby/netbox_enrich.rb @@ -995,7 +995,7 @@ def create_device_interface( _ip_primary_reponse.is_a?(Hash) && _ip_primary_reponse.has_key?(:id) then - _autopopulate_device = _ip_create_reponse + _autopopulate_device = _ip_primary_reponse end end # check if the IP address was created and has an ID