Check if env variable is set

Is it possible to check if an env variable is set? I tired a workaround like this
In bash
$set DATE=a

filter{
if (["{DATE:a}"]=="a") { mutate { add_field => { "startTime" => "2019-10-19" }} } else{ mutate { add_field => { "startTime" => "{DATE}" } }
}
}

the output is
startTime=>"a"

So, else statement was executed, instead of if statement.

Any ideas what is wrong here?

Thx, in advance.

See here.

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