B
B
beduin012018-05-10 16:34:16
Software design
beduin01, 2018-05-10 16:34:16

Where is the best place to write logs?

It is required to create a fault-tolerant logging system. Logs will be written in JSON format. I plan to write to send logs to logstash. Directly driving them there is not an option. On TCP, the queue can get clogged, on UDP we can lose something.
Hence, there are two options:
1. Write everything to a file and then make a service that will overtake from the file to logstash
2. Write everything to syslog and then somehow forward it to logstash
However, I do not see the pros / cons of the first and second approaches. What do you think?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Eremin, 2018-05-10
@EreminD

Well, you can raise a thread of rabbitMq or ActiveMq and shoot logs there. Or into kafka
from there and rake out the logstash
https://www.elastic.co/guide/en/logstash/current/p...
https://www.elastic.co/guide/en/logstash/current/p..
https://www.elastic.co/guide/en/logstash/current/p... For
jms and kafka, log4j even has its own appenders
https://logging.apache.org/log4j/2.0/manual/append ...

A
alex_kor, 2018-05-17
@alex_kor

We write locally to json, this json reads filebeat and sends it to logstash, from there we pull it up to elk

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question