I have a pipeline that executes every minute, at this moment I'm using the http_poller with a Get operation that, without filter, returns the first 100 in the last 24h.
It is possible to add filters on the Url in order to get the logs from certain time up to now, but I haven't seen any option of how generate an http_poller dynamic url to get the datetime minus an specific time.
Before I move the http_poller to a heartbeat and do the call as a filter, is there any other way to do it?
I'm in the same exact position, till now I didn't find any positive sign that this is doable.
Badger suggested to use a generator input to trigger dummy events, then use an http filter to make the REST call, but it is very "workaroundy" for my taste.
Let me know if you find something!
3-In the Filter section, use a the Ruby code plugin to update your $date environment variable (to something like $date = today()-10h )
4-Also in the Filter section, use the Ruby code plugin to edit your Logstash config file, by something that won't affect your pipeline, like adding or removing stdout in Output. Anything that triggers a config reload
Update:
The above contraption didn't work, unfortunately even with the --config.reload.automatic, the environment variables are not getting updated, because once the env vars gets updated it needs to be reloaded for the current process to see the update.
I tried adding the "refreshenv" command in the ruby code also, it does refresh, but I think to the cmd window only and not to the Java process, hence I'm still stuck in the same problem.
At this point, I'm super pissed and gave up on Logstash, I will use a PS or Python script to do this one.
When I run that configuration I get the output of the first URL followed 12 seconds later by the output of the second URL. So there is definitely potential here.
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.