我正在尝试 x pack 中的新机器学习模块。我正在尝试及时识别 HTTP 访问日志中的罕见响应代码。我的日志存储在 elasticsearch 中,如下所示:
{
"_index": "logstash-2017.05.18",
"_type": "Accesslog",
"_id": "AVxvVfFGdMmRr-0X-J5P",
"_version": 1,
"_score": null,
"_source": {
"request": "/web/Q123/images/buttons/asdf.gif",
"server": "91",
"auth": "-",
"ident": "-",
"verb": "GET",
"type": "Accesslog",
"path": "/path/to/log",
"@timestamp": "2017-05-18T10:20:00.000Z",
"response": "304",
"clientip": "1.1.1.1",
"@version": "1",
"host": "ip-10-10-10-10",
"httpversion": "1.1",
"timestamp": "18/May/2017:10:20:00 +0530"
},
"fields": {
"@timestamp": [
1495102800000
]
}
我添加了一个检测器,我将函数选为“稀有”,将 by_field_name 选为“响应”。但是当我保存作业时,出现以下错误:
Save failed: [illegal_argument_exception] Can't merge a non object mapping [response] with an object mapping [response]
请帮忙。