我保存日誌像集團通過IP類
{
"Host": "www.foo.com"
"CustomField":"X-FORWARDED-FROM 10.10.10.10"
},{
"Host": "www.foo.com"
"CustomField":"X-FORWARDED-FROM 10.20.10.192"
},{
"Host": "www.foo.com"
"CustomField":"X-FORWARDED-FROM 10.10.20.159"
},{
"Host": "www.foo.com"
"CustomField":"X-FORWARDED-FROM 10.10.10.150"
}
我想對於像
{
"_id":"10.10.10.0", "count":2,
"_id":"10.10.20.0", "count":1,
"_id":"10.20.10.0", "count":1,
}
我如何去了解這個總結IP接入的輸出來查詢MongoDB的訪問?
是'X-轉發-FROM'固定每個「CustomField」? –
X-FORWARDED-FROM是固定的。 –
可以試試我的答案 –