I tried with another pattern creating a field still issue is the same
input {
beats {
port => 5044
}
}
filter
{
if [fields][logtype] == "Seal_Async_Logs"
{
grok {
match => { "message" => ".*\[TIME\] Detecting content type for file took\: %{WORD:createdetectingcontentrt}"}
}
}
if [fields][logtype] == "Seal_Async_Logs" {
mutate {
convert => { "createdetectingcontentrt" => "integer" }
}
}
if [fields][logtype] == "Seal_Async_Logs" and [createdetectingcontentrt] < 2000 {
mutate {
add_field => { "responsetime" => "2secs" }
}
}
}
output {
elasticsearch {
hosts => ["http://xx.xx.xx.xx"]
index => "seal-test-uat-%{+YYYY.MM}"
ilm_enabled => false
}
}