Hello,
I've set up a transform to aggregate on process.name, however it continues to fail exactly on the same date with the following error -
Failed to index documents into destination index due to permanent error: [org.elasticsearch.xpack.transform.transforms.BulkIndexingException: Bulk index experienced [1] failures and at least 1 irrecoverable [org.elasticsearch.xpack.transform.transforms.TransformException: Destination index mappings are incompatible with the transform configuration.; org.elasticsearch.index.mapper.MapperParsingException: failed to parse field [process.name.terms] of type [flattened] in document with id 'AEd3S3VLUMATGYPzlKmOr_-PAAAAAAAA'. Preview of field's value: 'null'; java.lang.IllegalArgumentException: field name cannot be an empty string].; org.elasticsearch.xpack.transform.transforms.TransformException: Destination index mappings are incompatible with the transform configuration.; org.elasticsearch.index.mapper.MapperParsingException: failed to parse field [process.name.terms] of type [flattened] in document with id 'AEd3S3VLUMATGYPzlKmOr_-PAAAAAAAA'. Preview of field's value: 'null'; java.lang.IllegalArgumentException: field name cannot be an empty string]
The destination mappings were created by the transform itself. Should I adjust the destination mappings? Should I change the query? The data is all coming from the endpoint process index, so it doesn't seem like there would be any null process names.
The json for my transform should ensure that org id and process name always exist, but I'm still getting the null error.
How can I best handle these errors so it doesn't kill my transform? Also, how would I change the mapping so its not a flattened field and I can aggregate via visualizations? -
value={
"id": "brent-process6",
"version": "8.3.3",
"create_time": 1661870704986,
"source": {
"index": [
"logs-endpoint.events.process*"
],
"query": {
"bool": {
"filter": [
{
"bool": {
"should": [
{
"exists": {
"field": "organization.id"
}
}
],
"minimum_should_match": 1
}
},
{
"bool": {
"should": [
{
"exists": {
"field": "process.name"
}
}
],
"minimum_should_match": 1
}
}
]
}
}
},
"dest": {
"index": "brent-process2"
},
"sync": {
"time": {
"field": "@timestamp",
"delay": "60s"
}
},
"pivot": {
"group_by": {
"organization.id": {
"terms": {
"field": "organization.id"
}
},
"@timestamp": {
"date_histogram": {
"field": "@timestamp",
"calendar_interval": "1h",
"missing_bucket": true
}
}
},
"aggregations": {
"process.name.terms": {
"terms": {
"field": "process.name"
}
}
}
},
"settings": {},
"retention_policy": {
"time": {
"field": "@timestamp",
"max_age": "3d"
}
}
}
Output of GET _transform/brent-process6/_stats
{
"count": 1,
"transforms": [
{
"id": "brent-process6",
"state": "failed",
"reason": "Failed to index documents into destination index due to permanent error: [org.elasticsearch.xpack.transform.transforms.BulkIndexingException: Bulk index experienced [1] failures and at least 1 irrecoverable [org.elasticsearch.xpack.transform.transforms.TransformException: Destination index mappings are incompatible with the transform configuration.; org.elasticsearch.index.mapper.MapperParsingException: failed to parse field [process.name.terms] of type [flattened] in document with id 'AEd3S3VLUMATGYPzlKmOr_-PAAAAAAAA'. Preview of field's value: 'null'; java.lang.IllegalArgumentException: field name cannot be an empty string].; org.elasticsearch.xpack.transform.transforms.TransformException: Destination index mappings are incompatible with the transform configuration.; org.elasticsearch.index.mapper.MapperParsingException: failed to parse field [process.name.terms] of type [flattened] in document with id 'AEd3S3VLUMATGYPzlKmOr_-PAAAAAAAA'. Preview of field's value: 'null'; java.lang.IllegalArgumentException: field name cannot be an empty string]",
"node": {
"id": "KFZRFzWxTpOJ8ikSDhIJyQ",
"name": "06-prd-iad-elasticsearch",
"ephemeral_id": "gUJjyJx0RimMRHI2T5GPQw",
"transport_address": "x.x.x.x:9300",
"attributes": {}
},
"stats": {
"pages_processed": 21,
"documents_processed": 177835953,
"documents_indexed": 10000,
"documents_deleted": 0,
"trigger_count": 1,
"index_time_in_ms": 2825,
"index_total": 20,
"index_failures": 1,
"search_time_in_ms": 2919750,
"search_total": 21,
"search_failures": 0,
"processing_time_in_ms": 70,
"processing_total": 21,
"delete_time_in_ms": 0,
"exponential_avg_checkpoint_duration_ms": 0,
"exponential_avg_documents_indexed": 0,
"exponential_avg_documents_processed": 0
},
"checkpointing": {
"last": {
"checkpoint": 0
},
"next": {
"checkpoint": 1,
"position": {
"indexer_position": {
"@timestamp": 1651143600000,
"organization.id": "xxxxxx"
}
},
"checkpoint_progress": {
"docs_remaining": 4519755623,
"total_docs": 4697591576,
"percent_complete": 3.785683581104923,
"docs_indexed": 10500,
"docs_processed": 177835953
},
"timestamp_millis": 1661961740994,
"time_upper_bound_millis": 1661961600000
},
"changes_last_detected_at": 1661961740988,
"last_search_time": 1661961740988
}
}
]
}