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

Post on 16-Apr-2017

329 Views

Category:

Software

3 Downloads

Preview:

Click to see full reader

TRANSCRIPT

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

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.

Sample App

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.’

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/

Log4j2.xml

●Socket Appender

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

Running all the containersdocker-compose up

●Starts all the containers and linked to communicate

Kibana

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/

top related