In my cluster i have few detector and suddenly some detectors stopped working. when checking that i can see some errors in cluster level.
[2026-04-01T08:36:51,975][DEBUG][o.o.a.s.TransportSearchAction][1baf01041046fd159da64b23544b7d71] All shards failed for phase: [query]
org.opensearch.index.mapper.MapperParsingException: failed to parse
at org.opensearch.index.mapper.DocumentParser.wrapInMapperParsingException(DocumentParser.java:206)
at org.opensearch.index.mapper.DocumentParser.parseDocument(DocumentParser.java:99)
at org.opensearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:253)
at org.opensearch.percolator.PercolateQueryBuilderExt.doToQuery(PercolateQueryBuilderExt.java:525)
at org.opensearch.index.query.AbstractQueryBuilder.toQuery(AbstractQueryBuilder.java:141)
at org.opensearch.index.query.BoolQueryBuilder.addBooleanClauses(BoolQueryBuilder.java:348)
at org.opensearch.index.query.BoolQueryBuilder.doToQuery(BoolQueryBuilder.java:331)
at org.opensearch.index.query.AbstractQueryBuilder.toQuery(AbstractQueryBuilder.java:141)
at org.opensearch.index.query.QueryShardContext.lambda$toQuery$3(QueryShardContext.java:575)
at org.opensearch.index.query.QueryShardContext.toQuery(QueryShardContext.java:587)
at org.opensearch.index.query.QueryShardContext.toQuery(QueryShardContext.java:574)
at org.opensearch.search.SearchService.parseSource(SearchService.java:1592)
at org.opensearch.search.SearchService.createContext(SearchService.java:1311)
at org.opensearch.search.SearchService.executeQueryPhase(SearchService.java:877)
at org.opensearch.search.SearchService$2.lambda$onResponse$0(SearchService.java:843)
at org.opensearch.action.ActionRunnable.lambda$supply$0(ActionRunnable.java:74)
at org.opensearch.action.ActionRunnable$2.doRun(ActionRunnable.java:89)
at org.opensearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:52)
at org.opensearch.threadpool.TaskAwareRunnable.doRun(TaskAwareRunnable.java:78)
at org.opensearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:52)
at org.opensearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:59)
at org.opensearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:986)
at org.opensearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:52)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.lang.Thread.run(Thread.java:1583)
Caused by: java.lang.IllegalArgumentException: Cannot write to a field alias [Whitelisted_registry_create_key_8m3ufZsBcmJk0YA8W1o0].
at org.opensearch.index.mapper.DocumentParser.parseObjectOrField(DocumentParser.java:772)
at org.opensearch.index.mapper.DocumentParser.parseValue(DocumentParser.java:1143)
at org.opensearch.index.mapper.DocumentParser.innerParseObject(DocumentParser.java:571)
at org.opensearch.index.mapper.DocumentParser.parseObjectOrNested(DocumentParser.java:521)
at org.opensearch.index.mapper.DocumentParser.internalParseDocument(DocumentParser.java:141)
at org.opensearch.index.mapper.DocumentParser.parseDocument(DocumentParser.java:96)
... 24 more
Here its mentioned as my detector uses some mapping which is not there in my index, but when checking my mapping i can see the correct mapping in my detector queries.
{
".opensearch-sap-xdr_windows-detectors-queries-optimized-d6fa3730-ab67-4881-91b0-bcdebd962b80-000001": {
"mappings": {
"_meta": {
"schema_version": 1
},
"properties": {
"EventId_registry_create_key_8m3ufZsBcmJk0YA8W1o0": {
"type": "alias",
"path": "eventName_registry_create_key_8m3ufZsBcmJk0YA8W1o0"
},
"EventType_registry_create_key_8m3ufZsBcmJk0YA8W1o0": {
"type": "alias",
"path": "log.attributes.EventType_registry_create_key_8m3ufZsBcmJk0YA8W1o0"
},
"Image_registry_create_key_8m3ufZsBcmJk0YA8W1o0": {
"type": "alias",
"path": "log.attributes.Image_registry_create_key_8m3ufZsBcmJk0YA8W1o0"
},
"TargetObject_registry_create_key_8m3ufZsBcmJk0YA8W1o0": {
"type": "alias",
"path": "log.attributes.TargetObject_registry_create_key_8m3ufZsBcmJk0YA8W1o0"
},
"Whitelisted_registry_create_key_8m3ufZsBcmJk0YA8W1o0": {
"type": "alias",
"path": "log.attributes.Whitelisted_registry_create_key_8m3ufZsBcmJk0YA8W1o0"
},
"droppedAttributesCount_registry_create_key_8m3ufZsBcmJk0YA8W1o0": {
"type": "long"
},
"eventName_registry_create_key_8m3ufZsBcmJk0YA8W1o0": {
"type": "integer"
},
"flags_registry_create_key_8m3ufZsBcmJk0YA8W1o0": {
"type": "long"
},
"index": {
"type": "text"
},
"instrumentationScope": {
"properties": {
"version_registry_create_key_8m3ufZsBcmJk0YA8W1o0": {
"type": "keyword"
}
}
},
"log": {
"properties": {
"attributes": {
"properties": {
"EventType_registry_create_key_8m3ufZsBcmJk0YA8W1o0": {
"type": "keyword"
},
"Image_registry_create_key_8m3ufZsBcmJk0YA8W1o0": {
"type": "text",
"analyzer": "rule_analyzer"
},
"IngestedTimestamp_registry_create_key_8m3ufZsBcmJk0YA8W1o0": {
"type": "date"
},
"TargetObject_registry_create_key_8m3ufZsBcmJk0YA8W1o0": {
"type": "text",
"analyzer": "rule_analyzer"
},
"Whitelisted_registry_create_key_8m3ufZsBcmJk0YA8W1o0": {
"type": "boolean"
}
}
}
}
},
"monitor_id": {
"type": "text"
},
"observedTimestamp_registry_create_key_8m3ufZsBcmJk0YA8W1o0": {
"type": "date"
},
"query": {
"type": "percolator_ext"
},
"resource": {
"properties": {
"attributes": {
"properties": {
"DeviceName_registry_create_key_8m3ufZsBcmJk0YA8W1o0": {
"type": "keyword"
},
"EndpointId_registry_create_key_8m3ufZsBcmJk0YA8W1o0": {
"type": "long"
},
"ExternalIp_registry_create_key_8m3ufZsBcmJk0YA8W1o0": {
"type": "keyword"
},
"LocalIp_registry_create_key_8m3ufZsBcmJk0YA8W1o0": {
"type": "keyword"
},
"TenantId_registry_create_key_8m3ufZsBcmJk0YA8W1o0": {
"type": "keyword"
}
}
}
}
},
"schemaUrl_registry_create_key_8m3ufZsBcmJk0YA8W1o0": {
"type": "keyword"
},
"serviceName_registry_create_key_8m3ufZsBcmJk0YA8W1o0": {
"type": "keyword"
},
"severityNumber_registry_create_key_8m3ufZsBcmJk0YA8W1o0": {
"type": "integer"
},
"severityText_registry_create_key_8m3ufZsBcmJk0YA8W1o0": {
"type": "keyword"
},
"spanId_registry_create_key_8m3ufZsBcmJk0YA8W1o0": {
"type": "keyword"
},
"time_registry_create_key_8m3ufZsBcmJk0YA8W1o0": {
"type": "date"
},
"traceId_registry_create_key_8m3ufZsBcmJk0YA8W1o0": {
"type": "keyword"
}
}
}
}
}
Any solution that would help me identify the root cause will be more helpful. Looking forward the exact cause why I’m getting this error?