I need to set up a logstash conf file to export import csv file to elastic search. My issue it's that I don't know how can I evaluate a csv field in a if statement. I have a field "call_type" and I want to formated this like this:
if ["call_type"] == "([a-z][A-Z][ ])*[dD]ata([a-z][A-Z][ ])*"
mutate
{
replace => ["call_type", "data" ]
} } else if ["call_type"] =~ "([a-z][A-Z][ ])*[vV]oix([a-z][A-Z][ ])*"
{
mutate
{
replace => ["call_type", "voice" ]
}
}
else if ["call_type"] =~ "([a-z][A-Z][ ])*[sS]ms([a-z][A-Z][ ])*"
{
mutate
{
replace => ["call_type", "sms" ]
}
}
"call_type" is unknow with this if statement syntax. Someone know if statement syntax ?
Aucun commentaire:
Enregistrer un commentaire