简体   繁体   English

Elasticsearch不存储Logstash的Geoip数据

[英]Elasticsearch not storing geoip data from logstash

I'm trying to add the geoip map to kibana, following the into to logshash I can see the correct output from the rubydebug codec: 我正在尝试将geoip映射添加到kibana,跟随到logshash中,我可以看到rubydebug编解码器的正确输出:

"geoip" => {
    "location" => [
        [0] -122.3426,
        [1] 47.739599999999996
    ],

But when I query elasticsearch (using the query from kibana) for anything with a "geoip.location" field I get all the results. 但是,当我查询elasticsearch(使用来自kibana的查询)中带有“ geoip.location”字段的任何内容时,都会得到所有结果。 And none of the results have a geoip field. 而且所有结果都没有geoip字段。

{
"query": {
    "filtered": {
        "query": {
            "bool": {
                "should": [
                    {
                        "query_string": {
                            "query": "*"
                        }
                    }
                ]
            }
        },
        "filter": {
            "bool": {
                "must": [
                    {
                        "range": {
                            "@timestamp": {
                                "from": 1409025267221,
                                "to": 1409111667222
                            }
                        }
                    },
                    {
                        "exists": {
                            "field": "geoip.location"
                        }
                    }
                ]
            }
        }
    }
},
"fields": [
    "geoip.location",
    "_id"
],
"size": 1000,
"sort": [
    {
        "@timestamp": {
            "order": "desc"
        }
    }
]
}

Nevermind, it was that the dates were out of range. 没关系,那是日期超出范围。 When I added some recent data they showed up on the map 当我添加一些最近的数据时,它们会显示在地图上

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM