1.嗨,我正在尝试将AWS WAF日志从S3传输到Elastic Search
在创建索引时,我给出索引前缀,然后在选择时间戳时,这就是我得到的
refer image 1
2.i然后在线引用了一些解决方案https://github.com/awslabs/amazon-kinesis-agent/issues/108根据链接中的解决方案,我也添加了映射模板
这就是我添加的内容:
PUT /lb*/_mapping
{
"properties":{
"timestamp":{
"type":"date",
"format":"dd/MMM/YYYY HH:mm:ss,SSS"
}
}
}
3.选择时间戳后添加模板后,时间戳如下所示
refer image 2
refer image 3
不知道我在想什么。请帮我。
最佳答案
对于时间戳映射,应该是这样的
PUT _template/awswaf-logs
{
"index_patterns": ["awswaf-*"],
"settings": {
"number_of_shards": 1
},
"mappings": {
"waflog": {
"properties": {
"httpRequest": {
"properties": {
"clientIp": {
"type": "keyword",
"fields": {
"keyword": {
"type": "ip"
}
}
}
}
},
"timestamp": {
"type": "date",
"format": "epoch_millis"
}
}
}
}
}
您可以引用https://aws.amazon.com/blogs/security/how-to-analyze-aws-waf-logs-using-amazon-elasticsearch-service/以获得更多详细信息
关于amazon-web-services - 将AWS WAF日志从S3传输到ES时没有时间戳记,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60703878/