Giter Site home page Giter Site logo

Comments (6)

rfoltyns avatar rfoltyns commented on June 20, 2024 1

@thaarbach Should be possible in 1.6. You missed it by 4 days - I would have included it in 1.5..

Index-Templates, ILM are provided by elasticsearch out of the box.

I'm afraid it won't be that simple, but I'll play around with it and see what can be done.

from log4j2-elasticsearch.

rfoltyns avatar rfoltyns commented on June 20, 2024 1

I got it to work yesterday with a few quick hacks. It most likely will not be the final implementation. I can push it to a separate branch later if you're ok with building it on your own.

from log4j2-elasticsearch.

thaarbach avatar thaarbach commented on June 20, 2024

@rfoltyns
At friday i implemented ECS and it works fine. Thx for that. Then i played arround and found :
image
After i played arround, i realized that the bulk request are not in the correct from. But data stream and the binding to the provied ilm was created.

With this knowing, i copied the requests from failover.log and changed them to data stream conform form and put them with curl and voila the log entries appears in the data stream and log app.

curl -X PUT "localhost:9200/my-data-stream/_bulk?refresh&pretty" -H 'Content-Type: application/json' -d'
{"create":{ }}
{ "@timestamp": "2099-03-08T11:04:05.000Z", "user": { "id": "vlb44hny" }, "message": "Login attempt failed" }
{"create":{ }}
{ "@timestamp": "2099-03-08T11:06:07.000Z", "user": { "id": "8a4f500d" }, "message": "Login successful" }
{"create":{ }}
{ "@timestamp": "2099-03-09T11:07:08.000Z", "user": { "id": "l7gk7f82" }, "message": "Logout successful" }
'

Don't know how simple it is to implement them, because before each log entry you need to set the '{"created":{}}.

Thx anyway

from log4j2-elasticsearch.

thaarbach avatar thaarbach commented on June 20, 2024

@rfoltyns
Yes please, I just don't know when I'll get to try it. At the moment I am using a traditional index.

Have you already played with elastic apm? I like the log correlation with the correspondending traces and/or transactions.

from log4j2-elasticsearch.

rfoltyns avatar rfoltyns commented on June 20, 2024

I just pushed those quick hacks here.

It works with Data Streams only.

Once built, run it with:

mvn clean install -pl log4j2-elasticsearch-hc -Dtest=SmokeTest#programmaticConfigTest -Dlog4j2.level=INFO

I haven't tested the XML config yet, but some flags and Log4j2 annotations are already in place.

As for APM, similar correlation should be possible already with VirtualProperty and $${ctx:correlationId}.

from log4j2-elasticsearch.

rfoltyns avatar rfoltyns commented on June 20, 2024

Released in 1.6.0

from log4j2-elasticsearch.

Related Issues (20)

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.