User Tools

Site Tools


devops:logging:elk

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
devops:logging:elk [2018/04/10 15:43] skipidardevops:logging:elk [2023/11/01 07:15] (current) – ↷ Page moved from camunda:devops:logging:elk to devops:logging:elk skipidar
Line 9: Line 9:
  
  
-==== COnfiguration ELK stack for Java app ====+==== Java app logs to ELK==== 
 +Here a good tutorial: https://balamaci.ro/java-app-monitoring-with-elk-logstash/
  
  
Line 43: Line 44:
  
 == logback.xml== == logback.xml==
-COnfigure the appender to log to logstash.+Configure the appender to log to logstash.
  
 <code> <code>
Line 84: Line 85:
  
 </code> </code>
 +
 +
 +=== ELK side ===
 +
 +Configure Logstash to receive the data from the tcp appender, via TCP.
 +
 +Modify the input file:
 +/etc/logstash/conf.d/02-beats-input.conf
 +
 +https://github.com/logstash/logstash-logback-encoder#tcp-appenders
 +<code>
 +
 +input {
 +   tcp{     
 +    port => 5044
 +    codec => json_lines
 +  }
 +}
 +
 +</code>
 +
 +**Achtung: LogStash creates its own index!!! No need to mess around with the manual creation.**
 +
 +
 +=== Docker ===
 +Running ELK in docker for the demo.
 +
 +<code>
 +sudo docker run -v /home/vagrant/vagrant-home/02-beats-input.conf:/etc/logstash/conf.d/02-beats-input.conf -p 5601:5601 -p 9200:9200 -p 5044:5044 -d --name elk sebp/elk
 +
 +</code>
 +
devops/logging/elk.1523374994.txt.gz · Last modified: (external edit)