How to compare float in logstash?

It's the pipeline config for test:

input {
  file {
    path => "/tmp/test1.log"
  }
}
filter {
  json {
    source => "message"
  }
}

output {
  if [a] == 1.1 {
    stdout {}
  }
}

I echo some test log to logfile:

echo '{"a": 1.1,"b": "test"}' >> /tmp/test1.log

But there isn't any output in console, and I try use the condition if [a] == "1.1" either not work.

Somebody know how to compare float?

thanks!



Comments

Popular posts from this blog

Today Walkin 14th-Sept

Spring Elasticsearch Operations

Hibernate Search - Elasticsearch with JSON manipulation