Skip to content
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

ensureMappingTemplate & mappingTemplate seems not working #125

Open
mogadanez opened this issue Mar 24, 2020 · 4 comments
Open

ensureMappingTemplate & mappingTemplate seems not working #125

mogadanez opened this issue Mar 24, 2020 · 4 comments

Comments

@mogadanez
Copy link

I tried to debug it at bulk_writer.js

thiz.client.indices.putTemplate(tmplMessage).then(
          (res1) => {
              debugger
            fulfill(res1);
          },
          (err1) => {
            debugger
            reject(err1);
          }
        );

and it fall to catch with error

[mapper_parsing_exception] Root mapping definition has unsupported parameters:  [severity : {index=true, type=keyword}] [@timestamp : {type=date}]

mappingTemplate is exactly as in template

@vanthome
Copy link
Owner

I cannot confirm this, have you tried this with a fresh instance of ES? I could imagine that you already have an index pattern or your version of ES is not recent enough...

@Munawwar
Copy link
Contributor

Munawwar commented Jun 9, 2020

Are you using elasticsearch 6 or 7? This was happening with 6.. now recent PR fixed it (on master now.. didn't release yet).

@peey
Copy link

peey commented Jun 1, 2021

A bigger issue is that this silently fails. Versions:

Elasticsearch: 7
"winston": "^3.2.1",
"winston-elasticsearch": "0.15.5"

I had to deduce that the problem was actually here with a lot of trial and error. The package should instead throw an error / cause connection failure to elastic in case of incorrect configuration.

@peey
Copy link

peey commented Jun 25, 2021

This is a flaky bug. It sometimes happens and sometimes doesn't. Anyways, the problem goes away if I create the template myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants