cawoodm
(Marc)
March 8, 2018, 2:19pm
1
We have the following filter (Logstash 6.2 Windows):
if [category] == "hybrisserver" and [raw] =~ "Starting up hybris server" {
mutate { update => {"priority" => 2 "category" => "ServerStart" } }
}
The incoming events have priority as an integer (see 2nd event in screenshot below) but after mutate it's a string:
Badger
March 8, 2018, 2:37pm
2
This is true. Update replaces the current value of a field with a string. You could convert the field if you need it to be an integer.
cawoodm
(Marc)
March 8, 2018, 3:09pm
3
Are you stating the obvious or saying this is by design?
IMHO it's a bug.
cawoodm
(Marc)
March 8, 2018, 3:10pm
4
Just to be clear: "priority" is not really in the input. It's created via the following filter:
translate {
field => "type"
destination => "priority"
dictionary => {
"ERROR" => 3
"WARN" => 2
"INFO" => 1
"DEBUG" => 0
}
}
IMHO it's a bug.
I agree. Logstash's configuration language doesn't have integer literals, and quotes are optional for strings so 2
is treated as "2"
.
system
(system)
Closed
April 7, 2018, 8:38pm
6
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.