Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stream Nginx Logs to Kafka via kcat | messages are not sent as logs are written #445

Open
moatazsalem2 opened this issue Mar 16, 2024 · 1 comment

Comments

@moatazsalem2
Copy link

Hello,

I have started Nginx with access logs being directed to stdio
/usr/sbin/nginx -g 'daemon off;'

then updated the command to pipe the access logs to kcat
/usr/sbin/nginx -g 'daemon off;' | /usr/bin/kcat -b $KAFKA_HOST -t $KAFKA_TOPIC -P -X queue.buffering.max.ms=1 -l -X batch.num.messages=1 -X batch.size=1 -X queue.buffering.max.messages=1 -X queue.buffering.max.kbytes=1

As you can tell, i have played with many options, but still, out of each 5 page views, i get 4 entries in the topic which indicates that kcat is still buffering some access logs information.

Appreciate your support.

@OneCricketeer
Copy link

I'd recommend using something like Fluent-bit for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants