1
response

Hi,
I'm trying to send messages from NXLog into Logstash with a custom TAG. Logstash would filter those messages and then send them into specific topics in Kafka. For example my current Logstash + Filebeats works like that:

filebeat.yml has:

paths:
- /var/log/*.log

tags: ["EXAMPLE_1"]

Logstash.yml has :

output {
if "EXAMPLE_1" in [tags]{
kafka {
bootstrap_servers => "example_dns:9092"
topic_id => "example_1_topic_kafka"
}
}
}

Is it possible to recreate such simple config with NXLog?

AskedSeptember 6, 2018 - 11:53am

Answer (1)

Please check out the manual for examples on Logstash config.

Example nxlog.conf :

<Input file>
    Module      im_file
    File        "/var/log/*.log"
</Input>
<Output out>
    Module  om_tcp
    Host    10.1.1.1
    Port    3515
    Exec    to_json();
</Output>