Regarding Metric Filter

Hi,
I'm trying to dynamically add fields to a metric filter. Can you tell me why this is failing interpolation?

        metrics {
          meter => [ "events" ]
          add_field => {
            "agent" => "%{[agent][hostname]}"
          }
          add_tag => ["metric"]
          enable_metric => false
        }

if I use the same syntax with the mutate filter it works fine:

      mutate {
        add_field => {
        "agent" => "%{[agent][hostname]}"
        }
      }

Logstash version is 7.11.1.

Thx
D

The metrics filter is generating a new event based on the number of events it has seen in the previous five seconds. If it has seen 10 events, from which of those should it extract [agent][hostname]? logstash cannot decide. See issue 49.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.