Convert time in a lot off fields in Logstash

Hi,
My input is a json with tis values:

windMaxTime: "10:10"
dewpointMaxTime: "10:09"

date {
match => ["stats[sinceMidnight][windMaxTime]","HH:mm"]
target => "stats[sinceMidnight][windMaxTime]"
timezone => "UTC"
}
date{
match => ["stats[sinceMidnight][dewpointMaxTime]","HH:mm"]
target => "stats[sinceMidnight][dewpointMaxTime]"
timezone => "UTC"
}
date{
match => ["stats[sinceMidnight][tempMinTime]","HH:mm"]
target => "stats[sinceMidnight][tempMinTime]"
timezone => "UTC"
}

It works, but i have a lot of fields with name like xxxxxTime.

So, can i use a regular expression to convert field like xxxxxTime with value XX:XX in format DATE ???

Thank's a lot !

No, the date filter has no wildcard support. You could use a ruby filter though (or generate your configuration file from a template).

Arfff Thank's Magnus

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