Skip to content

Commit

Permalink
Bugfix client.ip (#26)
Browse files Browse the repository at this point in the history
* Bugfix client.ip

Make sure client.ip is always a string literal and not a comma seperated list of strings

* Just use $ip variable

* IP variable is always set, and use client.addresss ECS field as well
  • Loading branch information
firecow authored Nov 22, 2022
1 parent ef0d426 commit fc3a3f0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/FilebeatContextProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ public static function applyClientContextFields(array $record): array
$record['context']['client'] = [];
}

$record['context']['client']['ip'] = $ip;
$record['context']['client']['ip'] = explode(',', $ip);
$record['context']['client']['address'] = $ip;

return $record;
}
Expand Down

0 comments on commit fc3a3f0

Please sign in to comment.