fluent / fluent-plugin-grok-parser

Fluentd's Grok parser
Other
107 stars 31 forks source link

Two log structures output to two es indexes #81

Closed ChenZheOnePiece closed 4 years ago

ChenZheOnePiece commented 4 years ago

I have two logs structures, if I want save to es two index. Is it necessary to configure two source

skYl1r commented 4 years ago

if you mean how to separate the logs coming from one source, you can rewrite the tag of each log structure by the rewrite_tag_filter plugin then route them using the route plugin. you can find more examples for routing events here : https://docs.fluentd.org/configuration/routing-examples

cosmo0920 commented 4 years ago

In Fluentd v1 world, using label instead of tag is better: https://github.com/tagomoris/fluent-plugin-route#example-2-use-label

cosmo0920 commented 4 years ago

@skYl1r did answer for this issue. If there is more question about this issue, please feel free to add comments. Thank you for using this plugin!