【发布时间】:2019-03-01 15:56:19
【问题描述】:
ELK 堆栈版本 6.2.1
我正在关注本教程并尝试将 tshark 捕获发送到 ELK。
https://www.elastic.co/blog/analyzing-network-packets-with-wireshark-elasticsearch-and-kibana
由于 tshark 将所有字段捕获为文本,我正在尝试在 elasticsearch 中创建一个映射,以确保数字字段被索引为整数、文本为字符串等...
因此,我需要创建一个弹性搜索映射,但对这是什么感到困惑。这是否意味着要创建一个像下面这样的索引模板
packets-index_pattern.json 包含以下条目
PUT _template/packets
{
"template": "packets-*",
"mappings": {
"pcap_file": {
"dynamic": "false",
"properties": {
"timestamp": {
"type": "date"
},
"layers": {
"properties": {
"frame": {
"properties": {
"frame_frame_len": {
"type": "long"
},
"frame_frame_protocols": {
"type": "keyword"
}
}
},
"ip": {
"properties": {
"ip_ip_src": {
"type": "ip"
},
"ip_ip_dst": {
"type": "ip"
}
}
},
"udp": {
"properties": {
"udp_udp_srcport": {
"type": "integer"
},
"udp_udp_dstport": {
"type": "integer"
}
}
}
}
}
}
}
}
}
到目前为止,我已经创建了一个名为 packet-index_pattern.json 的文件,并尝试使用以下内容将其上传到 Elasticsearch,但是我收到一条错误消息,提示状态 400 curl: (6) could not resolve host: Content-Type
curl -XPUT 'localhost:9200/_template/packets-?pretty' -H 'Content-Type: application/json'
欢迎接受任何帮助
【问题讨论】: