date
{
match => [ "event_timestamp", "dd MMM yyyy HH:mm:ss,SSS" ]
target => "event_timestamp"
add_field => {"[hour]" => "%{+HH}"}
add_field => {"[min]" => "%{+EEE}"}
}
mutate{
convert =>{ "hour" => "integer"}
}
Hi
In logstash output for elasticsearch am using below code and getting
NoMethodError: undefined method `<’ for nil:NilClass>
if ([hour] < 2 ){
elasticsearch{
host =>[10.343.434.343:9200]
index => index -1
}}
} else if ( 5 > [hour] and [hour] >=2 )
{
elasticsearch{
host =>[10.343.434.343:9200]
index => index -2
}
}