-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for ECSLayout for elasticsearch-ahc and / or elaticsearch-jest in combination with data streams #84
Comments
Got it working with JestHttp. Forgot to change the dependency 🙈 |
I'm glad you got it working 👏 Watch out for the double <VirtualProperty name="client.ip" value="$${ctx:client.ip}" dynamic="true"/> .. and Also, I highly recommend I hacked the HC example to use your configuration. After a few tweaks it worked like a charm (mappings are still missing, but I'm sure you'll figure it out) Try mvn clean install && java -jar -Delastic.apm.environment=apm-test -Delastic.apm.service_name=elasticsearch-ahc log4j2-elasticsearch-hc-springboot/target/log4j2-elasticsearch-hc-springboot-0.0.1-SNAPSHOT.jar and then curl -XPOST -H 'Content-Type: application/json' -d '{}' http://localhost:9200/log4j2-elasticsearch-ahc/_search | jq on this branch |
Hey Rafal, ah, i thought the double
If i understand the log4j2.x system property
Thats why i'm tried AHCHttp first ;-). |
It works as an escape char, yes. First
I never got |
@thaarbach Is there anything else we can address regarding the original issue? Seems like the code - at least in this repository :) - works as advertised |
@rfoltyns i'm using AsyncLoggers and set some informations e.g. the current user.id in the ThreadContext (in our case MDC because of using SLF4J) and they are indexed when
Whould be nice, if ECSLayout also works with elasticsearch-ahc |
Is the log4j2-elasticsearch-examples branch I mentioned above not working as you expect? |
Didn't try it yet. At the moment i'm fighting with ingest piplines, because they won't be executed on index requests. Are ingest pipelines supported per request? |
I never played around with these tbh. Elasticsearch docs mentions I'll look into Pipeline API and see if there's a possibility to properly support it in 1.7 |
Got it working. The trick is set the pipeline as Old data can be updated with Now i'm be able to enrich the log entries with geo data and decode urls :-) |
Description
Support ECSLayout with log4j2-elasticsearch-ahc and/or log4j2-elasticsearch-jest
Why: If using appender in a centralized logging setup in combination with elastic-apm in a clustered environment it is much easier to setup the appender. Adding fields provided by the elastic-apm e.g.
client.ip, trace.id, transaction.id, http.*, error.*
etc. with VirtualProperties<VirtualProperty name="client.ip" value="$${ctx:client.ip}"/>
doesn't work.We have also tried to setup the appender with JestHttp with the use of data streams which won't work. maybe an configuration.
Configuration ahc
Configuration JestHttp
Additional
ILMPolicy with
createBootstapIndex
only works, if an empty template is providedThe text was updated successfully, but these errors were encountered: