You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Introduces a target field as a field reference (mixin validated) where if set result is placed into the target.
* Simplifies the set extracted values to the event with target logic. Applies setting to target with aggregations similarly with es-input.
* Mention to target in each fields which can be placed in the target. Docs info fields are placed in target field.
---------
(cherry picked from commit 5abbe49)
Co-authored-by: Rye Biesemeyer <yaauie@users.noreply.github.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,6 @@
1
+
## 3.18.0
2
+
- Add `target` configuration option to store the result into it [#197](https://github.com/logstash-plugins/logstash-filter-elasticsearch/pull/197)
3
+
1
4
## 3.17.1
2
5
- Add elastic-transport client support used in elasticsearch-ruby 8.x [#193](https://github.com/logstash-plugins/logstash-filter-elasticsearch/pull/193)
** `path.in.result`: field path in indexed result from {es}, using dot-notation
283
+
** `[path][on][event]`: path for where to place the value on the current event, using field-reference notation
274
284
275
-
An array of fields to copy from the old event (found via elasticsearch) into the
276
-
new event, currently being processed.
285
+
A mapping of indexed fields to copy into the <<plugins-{type}s-{plugin}-target>> of the current event.
277
286
278
287
In the following example, the values of `@timestamp` and `event_id` on the event
279
288
found via elasticsearch are copied to the current event's
@@ -521,6 +530,43 @@ WARNING: Setting certificate verification to `none` disables many security benef
521
530
522
531
Tags the event on failure to look up previous log event information. This can be used in later analysis.
523
532
533
+
[id="plugins-{type}s-{plugin}-target"]
534
+
===== `target`
535
+
536
+
* Value type is <<string,string>>
537
+
* There is no default value for this setting.
538
+
539
+
Define the target field for placing the result data.
540
+
If this setting is omitted, the target will be the root (top level) of the event.
541
+
542
+
The destination fields specified in <<plugins-{type}s-{plugin}-fields>>, <<plugins-{type}s-{plugin}-aggregation_fields>>, and <<plugins-{type}s-{plugin}-docinfo_fields>> are relative to this target.
543
+
544
+
For example, if you want the data to be put in the `operation` field:
545
+
[source,ruby]
546
+
if [type] == "end" {
547
+
filter {
548
+
query => "type:start AND transaction:%{[transactionId]}"
549
+
elasticsearch {
550
+
target => "transaction"
551
+
fields => {
552
+
"@timestamp" => "started"
553
+
"transaction_id" => "id"
554
+
}
555
+
}
556
+
}
557
+
}
558
+
559
+
`fields` fields will be expanded into a data structure in the `target` field, overall shape looks like this:
560
+
[source,ruby]
561
+
{
562
+
"transaction" => {
563
+
"started" => "2025-04-29T12:01:46.263Z"
564
+
"id" => "1234567890"
565
+
}
566
+
}
567
+
568
+
NOTE: when writing to a field that already exists on the event, the previous value will be overwritten.
Copy file name to clipboardExpand all lines: logstash-filter-elasticsearch.gemspec
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
Gem::Specification.newdo |s|
2
2
3
3
s.name='logstash-filter-elasticsearch'
4
-
s.version='3.17.1'
4
+
s.version='3.18.0'
5
5
s.licenses=['Apache License (2.0)']
6
6
s.summary="Copies fields from previous log events in Elasticsearch to current events "
7
7
s.description="This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
0 commit comments