Giter VIP home page Giter VIP logo

fluentd-jboss-eap-tail-example's Introduction

fluentd-jboss-eap-tail-example

This was tested using td-agent - Implementation should be identical for fluentd, besides different configuration files.

This setup tails JBoss Java logs and forwards to configured ES. For example:

Given the config:

<source>
  @type tail
  path /opt/rh/eap7/root/usr/share/wildfly/domain/servers/server-one/log/server.log
  tag my.node.eap.logs
  <parse>
    @type multiline
    format_firstline /\d{4}-\d{1,2}-\d{1,2}/
    format1 /^(?<time>\d{4}-\d{1,2}-\d{1,2} \d{1,2}:\d{1,2}:\d{1,2},\d{1,3})\s*(?<level>[a-zA-Z]*)\s*\[(?<thread>.+?)\] (?<message>.*)/
  </parse>
</source>

And the logs:

2019-08-06 10:18:27,742 INFO  [org.jboss.as] (MSC service thread 1-1) WFLYSRV0000: JBoss EAP 7.1.6.GA (WildFly Core 3.0.21.Final-redhat-00001) starting
2019-08-06 10:18:27,743 DEBUG [org.jboss.as.config] (MSC service thread 1-1) Configured system properties:
    file.encoding = UTF-8
    file.encoding.pkg = sun.io
    file.separator = /
    java.awt.graphicsenv = sun.awt.X11GraphicsEnvironment
    java.awt.headless = true
    java.awt.printerjob = sun.print.PSPrinterJob
    java.class.version = 52.0
    java.io.tmpdir = /tmp
    [etc]
2019-08-06 [..etc]

We produce the JSON:

  "_source": {
    "level": "INFO",
    "thread": "org.jboss.as",
    "message": "(MSC service thread 1-1) WFLYSRV0000: JBoss EAP 7.1.6.GA (WildFly Core 3.0.21.Final-redhat-00001) starting",
    "@timestamp": "2019-08-06T10:18:27.000000000-04:00",
    "@log_name": "my.node.eap.logs"
  }

and

  "_source": {
    "level": "DEBUG",
    "thread": "org.jboss.as.config",
    "message": "(MSC service thread 1-1) Configured system properties:\n    file.encoding = UTF-8\n    file.encoding.pkg = sun.io\n    file.separator = /\n    java.awt.graphicsenv = sun.awt.X11GraphicsEnvironment\n    java.awt.headless = true\n    java.awt.printerjob = sun.print.PSPrinterJob\n    java.class.version = 52.0\n    java.io.tmpdir = /tmp\n    [etc]",
    "@timestamp": "2019-08-06T10:18:27.000000000-04:00",
    "@log_name": "my.node.eap.logs"
  }

fluentd-jboss-eap-tail-example's People

Contributors

david-igou avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

martinmares

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.