Big thanks for the hint and help.
Do you have idea what to do in case of http_poller?, here it seems like I'd need somehow to get current date in Logstash,
You will have to set the environment variable before you start logstash to the value you want to input into the url.
This would technically work for the first JDBC input as well, but in that case it's much better to let SQL do the work.
Since the CURRENT_DATE variable is actually running the date command it will always be up to date. HOWEVER, I'm not sure if it will update in logstash after logstash starts.
In the documentation it states:
At Logstash startup, each reference will be replaced by the value of the environment variable.
So it is entirely possible that once logstash starts it will stay at a fixed current time.
If you want the current timestamp to update every time in your input then you'll have to restart logstash every day.
Blockquote
You cannot do that with an http_poller input . However, you could use http_poller just for its scheduler (or exec, or something else that has a scheduler option), then use an http filter to make the request.
Could you expalin a bit more?
Maybe with some example?
Thanks,
Kuba
I cannot provide an example, but the idea is that you use a filter with a schedule option to create events periodically. These events need not have any fields of interest. You might even use a prune filter to delete any fields that the input creates.
You could use an exec input to run the date command, in which case obviously you would keep that field. Or else use a ruby filter to run some ruby code that generates a timestamp from 90 seconds ago and add it to the event after the prune.
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.