How can i dynamically pass the date in the query 'Statment' and also use the same date as a output column?
I want the date to be 2 days behind the execution date
input {
jdbc {
jdbc_driver_library => "sqljdbc42.jar"
jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"
jdbc_connection_string => "*******"
jdbc_user => ''
jdbc_password => ''
schedule => " * * * *"
statement => " EXEC PROCEDURE_NAME @date = '20170928' "
}
}
filter {
grok {
match => { "message" => "%{COMBINEDAPACHELOG}"}
}
date {
match => [ "@timestamp", "ISO8601" ]
}
}
output {
stdout { codec => rubydebug }
influxdb {
allow_time_override => 'true'
data_points => { "time" => "@timestamp" }
send_as_tags => ["account_name"]
use_event_fields_for_data_points => true
host => "localhost"
}
}