expression don't get resolved in metric filter when adding fields

Description

Using version 1.2.3.dev

We are trying to add a field with the metrics plugin, but it does not resolve dynamic expressions like described in the documentation.
Trying this configuration

produces this output:

Activity

Show:
Tim Bunce
June 12, 2014, 1:29 PM

A good general solution to this would be for the metrics filter to (optionally) take a copy of the first event that creates a new key.
That saved event would then be cloned when the metrics filter creates a new event based on that key.
That way the fields from the original event are available for substitutions.

This is really important for metrics where the meter is dynamic (e.g. meter => [ "http.%{fe_name}" ]) because without it the values used to construct the key aren't available to any logic that needs to handle the generated metric.

Assignee

Logstash Developers

Reporter

Johannes Tuchscherer

Labels

Affects versions

Configure