Skip to content

Commit

Permalink
azure_network_watcher_vnet: fix field guards for MAC address processo…
Browse files Browse the repository at this point in the history
…rs (#10777)

Fix field guards for MAC address processors by replacing
duplicate null-check with check for empty string.
  • Loading branch information
efd6 authored Aug 15, 2024
1 parent e9bd635 commit 30d69b2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions packages/azure_network_watcher_vnet/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# newer versions go on top
- version: "0.2.2"
changes:
- description: Fix field guards for MAC address processors.
type: bugfix
link: https://github.com/elastic/integrations/pull/10777
- version: "0.2.1"
changes:
- description: Remove reference to a Kibana version from the README.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ processors:
field: json.macAddress
tag: uppercase_mac_address
ignore_missing: true
if: ctx.json?.macAddress !='' && ctx.json.macAddress != null
if: ctx.json?.macAddress != null && ctx.json.macAddress != ''
target_field: azure_network_watcher_vnet.log.mac_address
- gsub:
field: azure_network_watcher_vnet.log.mac_address
if: ctx.azure_network_watcher_vnet?.log?.mac_address != '' && ctx.azure_network_watcher_vnet.log.mac_address!= null
if: ctx.azure_network_watcher_vnet?.log?.mac_address != null && ctx.azure_network_watcher_vnet.log.mac_address!= ''
tag: gsub_mac_address
pattern: '(..)(?!$)'
replacement: '$1-'
Expand Down
2 changes: 1 addition & 1 deletion packages/azure_network_watcher_vnet/manifest.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
format_version: 3.1.2
name: azure_network_watcher_vnet
title: Azure Network Watcher VNet
version: "0.2.1"
version: "0.2.2"
description: Collect logs from Azure Network Watcher VNet with Elastic Agent.
type: integration
categories:
Expand Down

0 comments on commit 30d69b2

Please sign in to comment.