You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I have decided to use a template to display the specific fields that I need. I have a configuration for Log4net file and I wanted to send the same fields to Elasticsearch. In the fileappender I have something like
I want all of these fields and I added a template that will only have these properties. The template is created as well as the index but no data is added.
I tried the following:
Add
<IndexOperationParams>
<Parameter>
<Key>_id</Key>
<Value>%{IdSource}</Value>
</Parameter>
this one gives nasty errors (log4net:ERROR XmlHierarchyConfigurator: Cannot find Property [Parameter] to set object on [log4stash.Configuration.IndexOperationParamsDictionary])
Add the values in ElasticFilters as key value pairs in the add tag
Add the pattern showed above
None worked I am a little bit lost as what to do in order to have the fields in my template shown and have my data in elasticsearch.
While sending the request to index, do you see any error on you elastic server?
I believe log4stash still trying to send all logger properties to the server and since you declared the template explicitly it may caused an issue.
Try use Remove filter to remove unused properties. It is a bit inconvenience but can work.
Regarding IndexOperationParams error
Are you using the latest version?
I know it is a weird question but can you try <OrSetParameter> instead of <Parameter>
Pay attention that you used IdSource as Value and if you don't have property named that way it won't set it right.
* Fix function name of IndexOperationParams
In order to accept <Parameter> it should be named AddParameter()
* Fixed Tests
* May be related to issu #66
Co-authored-by: Eran Gil <[email protected]>
Hello,
I have decided to use a template to display the specific fields that I need. I have a configuration for Log4net file and I wanted to send the same fields to Elasticsearch. In the fileappender I have something like
<layout type="log4net.Layout.PatternLayout"> <conversionPattern value="%date{ISO8601} [%-5level] [%2thread] [%property{CorrelationId}] [%logger{1}] - %message%newline%exception"/> </layout>
I want all of these fields and I added a template that will only have these properties. The template is created as well as the index but no data is added.
I tried the following:
None worked I am a little bit lost as what to do in order to have the fields in my template shown and have my data in elasticsearch.
Thank you for your help @urielha .
The text was updated successfully, but these errors were encountered: