fluent / fluent-bit

Fast and Lightweight Logs and Metrics processor for Linux, BSD, OSX and Windows
https://fluentbit.io
Apache License 2.0
5.85k stars 1.58k forks source link

Nats output plugin does not work #2639

Closed asvetliy closed 3 years ago

asvetliy commented 4 years ago

Nats output plugin does not work

Description Hello, I wanted to use a bunch of Nats + fluent-bit for my application, but it did not work. The connection is terminated as soon as it has been established.

To Reproduce

  1. I use simple docker-compose.yml for testing:
    
    version: '3'

networks: app-net: driver: bridge

services: fluent-bit: image: fluent/fluent-bit:latest command: /fluent-bit/bin/fluent-bit -c /fluent-bit/etc/fluent-bit.conf -i cpu -o nats -p host=nats volumes:

Additional context As described in the documentation of NATS:

Fundamentally, NATS is about publishing and listening for messages. 
Both of these depend heavily on Subjects which scope messages into streams or topics. 
At its simplest, a subject is just a string of characters that form a name the publisher and 
subscriber can use to find each other.

So, for publishing some messages you need to set subject and it is also need to set queue group. But in the fluent-bit NATS plugin documentation no fields to do this. Thanks!

github-actions[bot] commented 3 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 3 years ago

This issue was closed because it has been stalled for 5 days with no activity.

lionello commented 1 year ago

It works, but you have to set a tag to whichever input you're using. Note that the FORWARD plugin doesn't set tags (but can optionally add a tag_prefix to the tag of the events it's forwarding.)

SamyElHamass commented 5 months ago

@lionello Thanks for your comment! This is kind of confusingly documented.

Is there also a possibility for authentication?