【发布时间】:2019-08-12 02:59:25
【问题描述】:
我正在尝试在我的 logstash 索引的“主机”属性上搜索服务器名称。
我正在 Kibana 的“发现”选项卡上进行搜索。
当我在搜索栏中录制 sl00pm 时,我得到了:
没有找到结果
但是当我添加星号(*)并搜索 sl00pm* 时,我得到了这个:
主机:sl00pm.soo85.poly-vale.intra 日期:2019-03-20 15:23:10,591
我不明白为什么。
但是当我对另一个服务器名称 slzq85 执行相同的操作时,我得到了这个:
主机:slzq85.soo85.poly-vale.intra 日期:21/Mar/2019:09:24:56 +0100
这正是我所期待的。
这是我在 LogStash 上的索引的定义:
{
"logstash-2019.03.20": {
"aliases": {},
"mappings": {
"apache-access": {
"_all": {
"enabled": true,
"norms": false
},
"dynamic_templates": [
{
"message_field": {
"match": "message",
"match_mapping_type": "string",
"mapping": {
"index": "analyzed",
"omit_norms": true,
"type": "string"
}
}
},
{
"string_fields": {
"match": "*",
"match_mapping_type": "string",
"mapping": {
"fields": {
"raw": {
"ignore_above": 256,
"index": "not_analyzed",
"type": "string"
}
},
"index": "analyzed",
"omit_norms": true,
"type": "string"
}
}
}
],
"properties": {
"@timestamp": {
"type": "date"
},
"@version": {
"type": "keyword"
},
"date": {
"type": "text",
"norms": false,
"fields": {
"raw": {
"type": "keyword",
"ignore_above": 256
}
}
},
"host": {
"type": "text",
"norms": false,
"fields": {
"raw": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
},
},
"settings": {
"index": {
"refresh_interval": "5s",
"number_of_shards": "5",
"provided_name": "logstash-2019.03.20",
"creation_date": "1553036402235",
"number_of_replicas": "1",
"uuid": "mCSFLYGETPm6qbgOwShHog",
"version": {
"created": "5060399"
}
}
}
}
}
还有版本:
version": {
"number": "5.6.3",
"lucene_version": "6.6.1"
},
你能告诉我为什么我的结果不好?
我想补充一点,我正在使用映射类型,并且在我的索引的不同映射类型中具有相同的属性,但具有与上述相同的定义
问候
【问题讨论】:
标签: elasticsearch lucene logstash kibana