developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and...

57
GrayLog for Java developers Track Monitoring & Cloud José Manuel Ortega

Transcript of developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and...

Page 1: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:

GrayLog for Java developers

Track Monitoring & Cloud

José Manuel Ortega

Page 2: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:

@jmortegac

Page 3: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:

Agenda

● Introduction to graylog● Docker image & compose● Graylog Architecture● Connecting with Java● Connecting with other services

Page 4: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:

GrayLog

Open Source Log Management

http://www.graylog.org/http://docs.graylog.org/

Page 5: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:

Graylog features

● Graylog is an open source logs monitor capable of handling messages from different sources:

● Application servers: IBM Websphere, Weblogic, Jboss

● Framework Applications: JAVA EE, NodeJS, Python, C#

● Web Servers: Nginx, Apache

Page 6: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:

Install

● Debian / Ubuntu (deb package)● RedHat / CentOS (RPM package)● Virtual Machine (OVA / Vagrant)● Config management (Chef / Puppet / Ansible)● Docker image && docker compose

Page 7: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:

https://packages.graylog2.org/appliances/ova

Page 8: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:

Docker images

Page 9: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:
Page 10: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:
Page 11: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:

Docker compose

Page 12: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:
Page 13: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:
Page 14: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:
Page 15: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:

Graylog features

● Receives messages from multiple input protocolsGELF via HTTP/UDP/TCP, Syslog, Apache Kafka, ....

● Assigns messages to streams● Triggers user-defined alerts per stream● Routes messages to different outputs based on streams● Stores messages in ElasticSearch for graphing● Uses MongoDB to store metadata and alerts● Provides search and graphing capabilities for stored

messages

Page 16: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:

Graylog features● Streams: They are message routing mechanisms in categories.● Alerts: Graylog allows to define alerts that are launched when

match with configured conditions.● Dashboards: Control panel where you can visualize everything

that happens in the monitored systems.● Searches: Graylog provides a search system on the historical from

where to locate the messages that help to react before problems.● Security: Allows you to set permissions to users to restrict the

access, display and search for messages.

Page 17: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:
Page 18: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:

ElasticSearch indexes

Page 19: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:

ElasticSearch indexes

Page 20: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:

Inputs

Page 21: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:

Streams

● Incoming messages can be grouped● Can be used for to assign user permissions● Stream alerts can send out notifications

Page 22: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:
Page 23: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:
Page 24: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:
Page 25: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:
Page 26: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:
Page 27: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:

GrayLog architecture

Page 28: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:
Page 29: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:
Page 30: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:
Page 31: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:

Connecting with Java

Page 32: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:

Sending log data to graylog

● Syslog– TCP, TCP+TLS, UDP, AMQP, Kafka

● GELF– TCP, TCP+TLS, UDP, HTTP, AMQP,Kafka

● Raw / Plain Text– TCP, TCP+TLS, UDP, AMQP, Kafka

● Collector– TCP, TCP+TLS

Page 33: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:

GELF

● Graylog Extended Log Format● Logstash, fluentd, nxlog, Docker, …● Based in syslog and rsyslog● JSON based format for sending structured

data● JSON Hash with mandatory fields:

○ host, version, short_message, full_message, timestamp, level

Page 34: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:

GELF document

Page 35: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:

Graylog message inspector

Page 36: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:
Page 37: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:
Page 38: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:
Page 39: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:

Jars

Page 40: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:
Page 41: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:
Page 42: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:
Page 43: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:
Page 44: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:
Page 46: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:

LogBack

Page 47: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:

LogBack appender

Page 48: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:

GraylogRestInterface

Page 49: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:

GelfMessage

Page 50: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:

Connecting with other services

Page 51: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:
Page 52: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:
Page 53: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:
Page 54: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:
Page 55: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:
Page 57: developers GrayLog for Java - FOSDEM · Logstash, fluentd, nxlog, Docker, … Based in syslog and rsyslog JSON based format for sending structured data JSON Hash with mandatory fields:

Thanks!

Contact:

@jmortegac

jmortega.github.io

about.me/jmortegac