-
Notifications
You must be signed in to change notification settings - Fork 46
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
adding custom mappings #2
Comments
Ok, I need to do some experiments here since we have a couple of options:
For a start I can implement absolute path and classpath handling just so you can make progress with your work, but do you think it makes sense to handle other cases? |
Hi Rafal, |
Hi Rafal, <Elasticsearch name="elasticsearch">
<JsonLayout compact="true" properties="true" />
<AsyncBatchDelivery indexName="log4j2" deliveryInterval="5000" batchSize="500">
<IndexTemplate>
{
"template": "log4j2*",
"settings": {
"index": {
"refresh_interval": "5s"
}
},
"mappings": {
...
...
}
</IndexTemplate>
<JestHttp serverUris="http://localhost:9200" />
</AsyncBatchDelivery>
</Elasticsearch>
|
I'm not sure whether Log4j config parser would handle the value passed like that, but |
The idea was, to handle it in the same way as Scripts without evaluate it. Maybe it must be surrounded with |
Ok, that might work. But it looks a bit too messy for my taste. File-based approach seems like a way to go here. |
Yes, it looks really a little bit messy, but you doesn't have spread the configurations arround. Classpath or filepath would be good enought. I just thought about it :) |
@thaarbach I've added index template loading via:
|
@rfoltyns
Hi Rafal
It would be great if you could also specify a path to a custom index template file. E.g. the field timeMillis is a long and it will indexed as long. In this case you can't use this field as a time filter in Kibana. Furthermore, you can not specify any other optimizations, e. g. dynamic templates.
Example index-template.json:
The template should be sent to ES during or after initializing the appender.
Futher informations here Index Templates
The text was updated successfully, but these errors were encountered: