We have a process that writes events to a file, without a timestamp. The file names themselves are suffixed with a timestamp, which is the timestamp that should be used for all the events in the file. Now, I am trying to parse the file by using the input file plugin of logstash. Is there a way by which I could get the name of the file to a field, so that I can then use the gsub filter to extract out the timestamp and then use the date filter to set the timestamp to the event?
相关问题
- I want to trace logs using a Macro multi parameter
- How to specify memcache server to Rack::Session::M
- Why am I getting a “C compiler cannot create execu
- reference to a method?
- Error message 'No handlers could be found for
相关文章
- how do I log requests and responses for debugging
- Ruby using wrong version of openssl
- Difference between Thread#run and Thread#wakeup?
- how to call a active record named scope with a str
- “No explicit conversion of Symbol into String” for
- Segmentation fault with ruby 2.0.0p247 leading to
- How to detect if an element exists in Watir
- uninitialized constant Mysql2::Client::SECURE_CONN
I had a similar need, and asked this question again - so you can find a more up-to-date answer in this question thanks to Jettro Coenradie :)