I am wondering how to use filter (kv maybe?) to extract core.log from "source": "/project_root/project_1/log/core.log", and put it in e.g. [@metadata][log_type], and so later on, I can use log_type in output to create an unique index, composing of hostname + logtype + timestamp, e.g.
Hi, yes, I know that there is a fixed overhead for using each index, and can be resource-intensive on aggregations. The logs harvested are coming from different modules of the whole system, so they do possess a different meanings in terms of the fields.
/(?<[@metadata][log_type]>[^/]+)$ is a regexp, yes. After a slash it captures one or more characters that are not slashes ([^/]+) up to the end of the line and stores them in the [@metadata][log_type] field.
thx for the explanation, where can I find the reference to the syntax of the expression, since it looks a bit different from the regex. For the store value part ?<> particularly.
Okay. It seems you can't have square brackets (or at signs?) in named capture destinations. Pick another field name. You can use a mutate filter to rename it to [@metadata][log_type] later on.
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.