shipping your logs to elk from mule app/cloudhub part 2

9
Shipping your logs to ELK from mule app/cloudhub - Part 2 A guide by Alex Fernandez

Upload: alex-fernandez

Post on 16-Apr-2017

329 views

Category:

Software


3 download

TRANSCRIPT

Page 1: Shipping your logs to elk from mule app/cloudhub   part 2

Shipping your logs to ELK from mule app/cloudhub - Part 2A guide by Alex Fernandez

Page 2: Shipping your logs to elk from mule app/cloudhub   part 2

Log4jApache Log4j 2 is an upgrade to Log4j that provides significant improvements over its predecessor, Log4j 1.x, and provides many of the improvements available in Logback while fixing some inherent problems in Logback's architecture.

Page 3: Shipping your logs to elk from mule app/cloudhub   part 2

Sample App

Page 4: Shipping your logs to elk from mule app/cloudhub   part 2

Configuring Logstash

Logstash can listen to port and can receive packets of data from log4j

Logstash will listen to port 3333, with the type of log4j and will be sent out to elasticsearch

*Note: elasticsearch is a link in docker that tells that logstash will connect to elasticsearch ‘container.’

Page 5: Shipping your logs to elk from mule app/cloudhub   part 2

docker-compose.yml

We have 3 containers, 1 elasticsearch, 1 logstash container and kibana. There ports are exposed and linked together.

* Note: I am docker installed in a machttps://docs.docker.com/engine/installation/mac/

Page 6: Shipping your logs to elk from mule app/cloudhub   part 2

Log4j2.xml

●Socket Appender

Note: Docker/container instance of logstash is in localdocker host and port of 3333.

Page 7: Shipping your logs to elk from mule app/cloudhub   part 2

Running all the containersdocker-compose up

●Starts all the containers and linked to communicate

Page 8: Shipping your logs to elk from mule app/cloudhub   part 2

Kibana

Page 9: Shipping your logs to elk from mule app/cloudhub   part 2

Referenceshttp://logging.apache.org/log4j/2.x/

https://en.wikipedia.org/wiki/Server_log

https://github.com/splunk/splunk-plugin-eclipse/blob/master/com.splunk.project.java.ui/resources/log4j2.xml

https://gist.github.com/dsummersl/3744192

https://docs.docker.com/engine/installation/mac/