Hi,
Several days ago, I followed the official guide to install fluentd (actually td-agent) on Ubuntu14.04.
The version number shown is: td-agent 0.10.58.
I plan to implement a sequence number for log events that are generated from the same log file.
For example, if all log events are tailed and generated from "server1.nginx.logfile1", I may want all those log events have these fields below:
{
"tag": "server1.nginx.logfile1",
"sequence": n,
"original_log_txt": "original txt msg in tailed file",
"parsed_log_field1": "parsed log field1 like HTTP GET/POST method",
"parsed_log_field2": "parsed log field2 like browser agent types such as Safari/Chrome",
"parsed_log_field3": "... ...",
... ...
"timestamp": "epoch time, or logstash format time, or whatever time format"
}
The sequence number n is a strictly increasing number that is used as a logic clock.
With such a precise logic clock, I can always perfectly restore the log event order on log database (on Elasticsearch or MongoDB). This sequence is useful because sometimes log events do not reach log database in order, or some log events happens at the same/close timestamp. Sequence number is also efficient and precise when I build some queries on log database.
To the job with fluentd, I did searches and found some posts that are related to my requirements.
It seems I even need to insert some Ruby code into cfg file to implement such a sequence number?
I think this is the right direction. Any suggestion?
But I also found an official blog saying that "v0.12 is Released".
I checked the blog, that the new "filter" feature changes the way how previous plugins (like fluent-plugin-record-reformer) work.
My questions for the versions are:
v0.12 with new "filter" feature is new (with no detailed documentations and samples). It is sufficient to implement the log event sequence number I want?
Many questions.
Thanks a lot in advance!
Ye