Is there any Elastic Search appender for directly sending(storing) spring-boot application logs to Elastic Search without using ELK stack - spring-boot

We are planning to store our (Spring-Boot) application logs to ElasticSearch. I am aware of ELK stack, which uses FileBeat + LogStash to collect and process the logs.
What is desired: Have an appender in logback.xml to directly send the logs to ElasticSearch. The very basic idea is of having an appender like File-Appenders with the difference of target for storing logs being ElasticSearch. At the same time, we want to do it in asynchronous manner. FYI, we are using slf4j with logback implementations for logging.
More specifically: We want to remove the intermediators:: Logstash or Beats as they will need more infra and may bring unwanted overhead. And having the process of sending logs to ElasticSearch in asynchronous way would be really great (so that application does not suffer latency due to logging).
What I have already tried:
Send Spring Boot logs directly to LogStash. But it seems of not much use, since it internally uses file appenders and the logs are then sent to LogStash.
Is there any such appenders available? Or maybe there is some workaround.

Related

Difference between Zipkin and Elastic Stack(ELK)?

Spring Cloud Sleuth is used for creating traceIds (Unique to request across services) and spanId (Same for one unit for work). My idea is that Zipkin server is used to get collective visualization of these logs across service. But I know and have used ELK stack which does necessarily the same function. I mean we can group requests with the same traceId for visualising, using ELK stack. But I do see people trying to implement distributed tracing with Sleuth, ELK along with Zipkin, as in these examples (Link1,Link2). But why do we need Zipkin if there is already ELK for log collection and visualising? Where I am missing?

Transfer logs from kafka to elasticsearch

I am looking for the light-weight log shipper which can directly transfer my logs to elasticsearch from kafka. Out of Filebeat, Logagent, Logstash(but i need light weighted) which among them or others can suites my use-case the best?
rsyslog is lightweight. As from version 8.27, it supports kafka as input. Elasticsearch as output is supported from even earlier.
Kafka input module configuration is described here
Elasticsearch output module configuration is described here

Direct integration of Logback with Elasticsearch

I have Spring Boot applications with slf4j/logback and look for centralized logging solution.
Now I see that I don't need to use log collector (like logstash/filebeat/rsyslog). There is a direct collector Ingest Node inside Elasticsearch (if I understand properly).
How can I integrate Logback with Ingest Node?
I would like to use Slf4j MDC and hope that integration will support MDC out of the box.

Logstash - prevent to loading logdata

I have log data from tomcat server(logback), and would like to analysis it.
So, this is my thought.
logback log data -> logstash -> elasticsearch -> request elastic query.
From some other architecture, there is redis in front of logback, becuase logback has no buffer.
If I would like to do this in real time, is redis requeried?
Or no need it because all data is already stored in elastic? than why are they using redis for it?

Kafka-Connect vs Filebeat & Logstash

I'm looking to consume from Kafka and save data into Hadoop and Elasticsearch.
I've seen 2 ways of doing this currently: using Filebeat to consume from Kafka and send it to ES and using Kafka-Connect framework. There is a Kafka-Connect-HDFS and Kafka-Connect-Elasticsearch module.
I'm not sure which one to use to send streaming data. Though I think that if I want at some point to take data from Kafka and place it into Cassandra I can use a Kafka-Connect module for that but no such feature exists for Filebeat.
Kafka Connect can handle streaming data and is a bit more flexible. If you are just going to elastic, Filebeat is a clean integration for log sources. However, if you are going from Kafka to a number of different sinks, Kafka Connect is probably what you want. I'd recommend checking out the connector hub to see some examples of open source connectors at your disposal currently http://www.confluent.io/product/connectors/

Resources