Sending Java Logs to Elastic Search, an efficient way?


(Zeal Vora) #1

Hi

We are planning to have centralized logging system and have been sending Linux related logs to Elastic Search and searching them via Kibana.

We were planning to send Java LOGS as well. So was wondering, is it efficent to send whole Java log to Elastic Search and access them via Kibana ?

We were planning to remove the Developer's access into the servers, so they will have to go to Kibana to see and go through their logs.

What would be a right way to do this ?

Thanks


(Mark Walkom) #2

You can definitely do this with Logstash.


(Jörg Prante) #3

Not sure what you mean by "Java logs", maybe stack traces? If you use log4j2 you can try my appender at https://github.com/jprante/log4j2-elasticsearch


(Magnus Bäck) #4

https://github.com/logstash/log4j-jsonevent-layout is a Log4j layout that produces Logstash-friendly JSON that I prefer strongly to writing a series of Logstash filters for parsing a "normal" human-readable text log (especially since there's no standard format for those).


(Otis Gospodnetić) #5

Hi,

This should help with multi-line logs, like Java stack exception traces: http://blog.sematext.com/2015/05/26/handling-stack-traces-with-logstash/

Otis

Monitoring * Alerting * Anomaly Detection * Centralized Log Management
Solr & Elasticsearch Support * http://sematext.com/


(system) #6