I know in logstash you can forward logs.
Can you use different targets and protocol for different classes? I want to separate the forwarding target between my json and syslog logs. How do I do that?
I know in logstash you can forward logs.
Can you use different targets and protocol for different classes? I want to separate the forwarding target between my json and syslog logs. How do I do that?
Copyright © 2021 Jogjafile Inc.
You can separate different flows as per their needs using tags and apply operations to them accordingly. A sample code is mentioned below:
Explanation :
In the input plugin, all the events flowing from port 2200 and 9999 are added with tags apache and firewall respectively. This will be used to apply separate filter operations to each of the event based on the tag added in the input plugin. Now, In the same way these events can be separately sent to different or same endpoint (be it a log file, a console output, an Elasticsearch storage etc.)