-
Use vector1 to collect file logs to Kafka; Use Vector2 to send logs from Kafka to cloki. But I have some questions:
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Hi @ktpktr0 !
My understanding is that the Kafka broker determines which partitions are assigned to which consumers. It should fairly distribute them so if you have, say, 8 partitions and 2 Vector instances consuming, each Vector instance will consume 4 partitions. You can find many available Kafka configuration options on https://github.com/edenhill/librdkafka/blob/master/CONFIGURATION.md which maps to
Either one would work, but it depends on several trade-offs:
In general, we recommend doing most of the parsing and aggregation in the "aggregator" layer of this sort of architecture; in your case vector2.
I'm not sure I completely understand this question. You can do grok parsing from VRL. We aim to have VRL be performant. Grok parsing is inherently slow since it is regex under the hood, but is usually sufficient for many use cases.
VRL is the defacto way to parse logs in Vector. It offers many parsing functions including grok parsing and regex parsing. Hopefully that helps! Let me know if you have any other questions. |
Beta Was this translation helpful? Give feedback.
-
Thank you for your reply. I have tried VRL recently, but it never works properly, even if I directly copy the sample log and VRL configuration in the document. Therefore, it is recommended that VRL provide more log examples of programming languages or services when parsing logs, such as Java, golang, nginx, redis, /var/log, and so on. I also tried parse_ Grok, unfortunately, its value needs to be filled in instead of directly parsing the log like logstash. So I still have to choose VRL as the tool to parse logs. Whether to consider developing a tool similar to grokdebug for VRL log parsing test tool in the later stage. |
Beta Was this translation helpful? Give feedback.
-
I tried the simplest log transform, but it didn't work. It does not parse or store logs Log content:
vector config:
|
Beta Was this translation helpful? Give feedback.
I tried the simplest log transform, but it didn't work. It does not parse or store logs
Log content: