I am reusing same values (see integer 100 example below) in my logstash configuration file. Is there way I can define constant at the beginning of the file i.e. THRESHOLD=60 for later use in the config file
if [SOMETHING][count] > 100 {
exec {
command => "iquery-notify -time=60"
}
}
also in this particular case is it possible to pass variable %{URL} to exec command ?
I am reusing same values (see integer 100 example below) in my logstash configuration file. Is there way I can define constant at the beginning of the file i.e. THRESHOLD=60 for later use in the config file
You can access environment variables via ${name-of-variable} but Logstash has no constant concept of its own (unless you store the value in a field).
also in this particular case is it possible to pass variable %{URL} to exec command ?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.