Convert time in a lot off fields in Logstash


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"
match => ["stats[sinceMidnight][dewpointMaxTime]","HH:mm"]
target => "stats[sinceMidnight][dewpointMaxTime]"
timezone => "UTC"
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 !

(Magnus B├Ąck) #2

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

(system) #4

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