[BugFix] Fix the bug where the es catalog cannot view the es6 table #30608
+7
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #issue
What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist:
Bugfix cherry-pick branch check:
Please refer to the following website for detailed feedback
https://forum.mirrorship.cn/t/topic/8756
We have created a global dynamic template in the ES 6.4.3 cluster. Each time we add an idnex, there are two JSON keys in the mappings of each index, which can cause parsing exceptions and prevent the table from being read. Any extra keys are called_ Default_.
So in response to this situation_ Default_ I made a judgment.
The code submitted this time can address this situation.
It will not affect the original logic.
{
"test2222": {
"mappings": {
"_doc": {
"_all": {
"enabled": false
},
"dynamic_templates": [
}
end
There are other questions, such as the index mapping format in the ES8 system
I'm not sure how to handle it. Should I not read this table, or should I code it and read this table
{
"metrics-endpoint.metadata_current_default": {
"mappings": {
"dynamic": "false",
"_meta": {
"created_by": "transform",
"_transform": {
"transform": "endpoint.metadata_current-default-8.6.1",
"version": {
"created": "8.6.0"
},
"creation_date_in_millis": 1688377236210
}
},
"dynamic_templates": [
{
"strings_as_keyword": {
"match_mapping_type": "string",
"mapping": {
"ignore_above": 1024,
"type": "keyword"
}
}
}
],
"date_detection": false,
"properties": {
"@timestamp": {
"type": "date"
},
"Endpoint": {
"properties": {
"capabilities": {
"type": "keyword",
"doc_values": false,
"ignore_above": 128
},
"configuration": {
"properties": {
"isolation": {
"type": "boolean",
"null_value": false
}
}
},
"policy": {
"properties": {
"applied": {
"properties": {
"id": {
"type": "keyword",
"ignore_above": 1024
},
"name": {
"type": "keyword",
"ignore_above": 1024
},
"status": {
"type": "keyword",
"ignore_above": 1024
}
}
}
}
},
"state": {
"properties": {
"isolation": {
"type": "boolean",
"null_value": false
}
}
},
"status": {
"type": "keyword",
"ignore_above": 1024
}
}
},
"agent": {
"properties": {
"id": {
"type": "keyword",
"ignore_above": 1024
},
"name": {
"type": "keyword",
"ignore_above": 1024
},
"type": {
"type": "keyword",
"ignore_above": 1024
},
"version": {
"type": "keyword",
"ignore_above": 1024
}
}
},
"data_stream": {
"properties": {
"dataset": {
"type": "constant_keyword",
"value": "endpoint.metadata"
},
"namespace": {
"type": "keyword"
},
"type": {
"type": "constant_keyword",
"value": "metrics"
}
}
},
"ecs": {
"properties": {
"version": {
"type": "keyword",
"ignore_above": 1024
}
}
},
"elastic": {
"properties": {
"agent": {
"properties": {
"id": {
"type": "keyword",
"ignore_above": 1024
}
}
}
}
},
"event": {
"properties": {
"action": {
"type": "keyword",
"ignore_above": 1024
},
"category": {
"type": "keyword",
"ignore_above": 1024
},
"code": {
"type": "keyword",
"ignore_above": 1024
},
"created": {
"type": "date"
},
"dataset": {
"type": "keyword",
"ignore_above": 1024
},
"hash": {
"type": "keyword",
"ignore_above": 1024
},
"id": {
"type": "keyword",
"ignore_above": 1024
},
"ingested": {
"type": "date"
},
"kind": {
"type": "keyword",
"ignore_above": 1024
},
"module": {
"type": "keyword",
"ignore_above": 1024
},
"outcome": {
"type": "keyword",
"ignore_above": 1024
},
"provider": {
"type": "keyword",
"ignore_above": 1024
},
"sequence": {
"type": "long"
},
"severity": {
"type": "long"
},
"type": {
"type": "keyword",
"ignore_above": 1024
}
}
},
"host": {
"properties": {
"architecture": {
"type": "keyword",
"ignore_above": 1024
},
"domain": {
"type": "keyword",
"ignore_above": 1024
},
"hostname": {
"type": "keyword",
"ignore_above": 1024
},
"id": {
"type": "keyword",
"ignore_above": 1024
},
"ip": {
"type": "ip"
},
"mac": {
"type": "keyword",
"ignore_above": 1024
},
"name": {
"type": "keyword",
"ignore_above": 1024
},
"os": {
"properties": {
"Ext": {
"properties": {
"variant": {
"type": "keyword",
"ignore_above": 1024
}
}
},
"family": {
"type": "keyword",
"ignore_above": 1024
},
"full": {
"type": "keyword",
"ignore_above": 1024,
"fields": {
"caseless": {
"type": "keyword",
"ignore_above": 1024,
"normalizer": "lowercase"
},
"text": {
"type": "text",
"norms": false
}
}
},
"kernel": {
"type": "keyword",
"ignore_above": 1024
},
"name": {
"type": "keyword",
"ignore_above": 1024,
"fields": {
"caseless": {
"type": "keyword",
"ignore_above": 1024,
"normalizer": "lowercase"
},
"text": {
"type": "text",
"norms": false
}
}
},
"platform": {
"type": "keyword",
"ignore_above": 1024
},
"version": {
"type": "keyword",
"ignore_above": 1024
}
}
},
"type": {
"type": "keyword",
"ignore_above": 1024
},
"uptime": {
"type": "long"
}
}
},
"updated_at": {
"type": "alias",
"path": "event.ingested"
}
}
}
}
}