What is the minimal configuration ? #70
Replies: 5 comments 3 replies
-
Mininal config depends on Elasticsearch version and log4j2-elasticsearch module that you're using. Once you provide an index template and XML config from project's main page, it should work. Have you tried log4j2-elasticsearch-examples yet? Could you post your current config? In 1.5.1, required elements are:
Optional elements:
|
Beta Was this translation helpful? Give feedback.
-
I tried log4j2-elasticsearch-jest-springboot against my ES 6 and got some documents indexed there. The log4j element in my application is
|
Beta Was this translation helpful? Give feedback.
-
This are my dependencies at the moment (log4j2 coming from spring-boot-starter-log4j2:2.0.7.RELEASE): log4j2-elasticsearch-core:1.4.0 |
Beta Was this translation helpful? Give feedback.
-
I got this one working with ES 6.80 in jest-springboot example (notice <Elasticsearch name="elasticsearch">
<IndexName indexName="log4j2"/>
<JacksonJsonLayout/>
<AsyncBatchDelivery batchSize="5000" deliveryInterval="500">
<IndexTemplate name="log4j2" path="<MY_LOCAL_REPO_PATH>/log4j2-elasticsearch/log4j2-elasticsearch-jest/src/test/resources/indexTemplate-6.json"/>
<JestHttp serverUris="http://localhost:9200" mappingType="index"/>
</AsyncBatchDelivery>
</Elasticsearch>
Apart from latest Log4j2 jars you're missing |
Beta Was this translation helpful? Give feedback.
-
Thank you, I'm getting some progress, the problem now is related with log4j2 itself, java.lang.NoClassDefFoundError: org/apache/logging/log4j/core/time/Instant I assume that I need to get closer to 2.13+ as you suggested before. |
Beta Was this translation helpful? Give feedback.
-
I'm just trying to start sending logs to ES. At the moment I'm facing the following error
ERROR StatusLogger No Elasticsearch client factory [JestHttp|ElasticsearchBulkProcessor] provided for AsyncBatchDelivery: clientObjectFactory
ERROR StatusLogger Could not create plugin of type class org.appenders.log4j2.elasticsearch.AsyncBatchDelivery for element AsyncBatchDelivery
org.apache.logging.log4j.core.config.ConfigurationException: Arguments given for element AsyncBatchDelivery are invalid
Please let me know if I should create an Issue instead of a discussion.
Thanks
Jose
Beta Was this translation helpful? Give feedback.
All reactions