【发布时间】:2020-07-24 16:35:20
【问题描述】:
我正在尝试将 SendGrid 事件发送到 kibana,但出现以下错误
[root@elasticsearch-7 /]# sendgrid-event-logger
Installing template..
ERROR:[mapper_parsing_exception] Root mapping definition has unsupported parameters: [log : {dynamic_templates=[{string_fields={mapping={fielddata={format=disabled}, index=analyzed, omit_norms=true, type=string, fields={raw={index=not_analyzed, type=string}}}, match_mapping_type=string, match=*}}], properties={date={format=yyyy.MM.dd, type=date}, sg_message_id={index=not_analyzed, type=string}, ip={index=not_analyzed, type=ip}, sg_event_id={index=not_analyzed, type=string}, event={index=not_analyzed, type=string}, email={fielddata={format=disabled}, index=analyzed, omit_norms=true, type=string, fields={domain={analyzer=email_domain_analyzer, index=analyzed, type=string}, raw={index=not_analyzed, type=string}}}, timestamp={format=epoch_second, type=date}}}] :: {"path":"/_template/sendgrid_template","query":{},"body":"{\"template\":\"mail-*\",\"settings\":{\"number_of_shards\":1,\"index\":{\"analysis\":{\"tokenizer\":{\"email_domain_tokenizer\":{\"type\":\"pattern\",\"pattern\":\"^.+@\",\"group\":-1}},\"analyzer\":{\"email_domain_analyzer\":{\"type\":\"custom\",\"tokenizer\":\"email_domain_tokenizer\"}}}}},\"mappings\":{\"log\":{\"dynamic_templates\":[{\"string_fields\":{\"match\":\"*\",\"match_mapping_type\":\"string\",\"mapping\":{\"type\":\"string\",\"index\":\"analyzed\",\"omit_norms\":true,\"fielddata\":{\"format\":\"disabled\"},\"fields\":{\"raw\":{\"type\":\"string\",\"index\":\"not_analyzed\"}}}}}],\"properties\":{\"email\":{\"type\":\"string\",\"index\":\"analyzed\",\"omit_norms\":true,\"fielddata\":{\"format\":\"disabled\"},\"fields\":{\"raw\":{\"type\":\"string\",\"index\":\"not_analyzed\"},\"domain\":{\"type\":\"string\",\"index\":\"analyzed\",\"analyzer\":\"email_domain_analyzer\"}}},\"timestamp\":{\"type\":\"date\",\"format\":\"epoch_second\"},\"date\":{\"type\":\"date\",\"format\":\"yyyy.MM.dd\"},\"event\":{\"type\":\"string\",\"index\":\"not_analyzed\"},\"ip\":{\"type\":\"ip\",\"index\":\"not_analyzed\"},\"sg_event_id\":{\"type\":\"string\",\"index\":\"not_analyzed\"},\"sg_message_id\":{\"type\":\"string\",\"index\":\"not_analyzed\"}}}},\"aliases\":{\"mail\":{}}}","statusCode":400,"response":"{\"error\":{\"root_cause\":[{\"type\":\"mapper_parsing_exception\",\"reason\":\"Root mapping definition has unsupported parameters: [log : {dynamic_templates=[{string_fields={mapping={fielddata={format=disabled}, index=analyzed, omit_norms=true, type=string, fields={raw={index=not_analyzed, type=string}}}, match_mapping_type=string, match=*}}], properties={date={format=yyyy.MM.dd, type=date}, sg_message_id={index=not_analyzed, type=string}, ip={index=not_analyzed, type=ip}, sg_event_id={index=not_analyzed, type=string}, event={index=not_analyzed, type=string}, email={fielddata={format=disabled}, index=analyzed, omit_norms=true, type=string, fields={domain={analyzer=email_domain_analyzer, index=analyzed, type=string}, raw={index=not_analyzed, type=string}}}, timestamp={format=epoch_second, type=date}}}]\"}],\"type\":\"mapper_parsing_exception\",\"reason\":\"Failed to parse mapping [_doc]: Root mapping definition has unsupported parameters: [log : {dynamic_templates=[{string_fields={mapping={fielddata={format=disabled}, index=analyzed, omit_norms=true, type=string, fields={raw={index=not_analyzed, type=string}}}, match_mapping_type=string, match=*}}], properties={date={format=yyyy.MM.dd, type=date}, sg_message_id={index=not_analyzed, type=string}, ip={index=not_analyzed, type=ip}, sg_event_id={index=not_analyzed, type=string}, event={index=not_analyzed, type=string}, email={fielddata={format=disabled}, index=analyzed, omit_norms=true, type=string, fields={domain={analyzer=email_domain_analyzer, index=analyzed, type=string}, raw={index=not_analyzed, type=string}}}, timestamp={format=epoch_second, type=date}}}]\",\"caused_by\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"Root mapping definition has unsupported parameters: [log : {dynamic_templates=[{string_fields={mapping={fielddata={format=disabled}, index=analyzed, omit_norms=true, type=string, fields={raw={index=not_analyzed, type=string}}}, match_mapping_type=string, match=*}}], properties={date={format=yyyy.MM.dd, type=date}, sg_message_id={index=not_analyzed, type=string}, ip={index=not_analyzed, type=ip}, sg_event_id={index=not_analyzed, type=string}, event={index=not_analyzed, type=string}, email={fielddata={format=disabled}, index=analyzed, omit_norms=true, type=string, fields={domain={analyzer=email_domain_analyzer, index=analyzed, type=string}, raw={index=not_analyzed, type=string}}}, timestamp={format=epoch_second, type=date}}}]\"}},\"status\":400}"}
【问题讨论】:
标签: api elasticsearch mapping