前往小程序,Get更优阅读体验!
立即前往
发布
社区首页 >专栏 >Logstash 基础4

Logstash 基础4

作者头像
franket
发布2022-02-10 20:29:55
发布2022-02-10 20:29:55
26600
代码可运行
举报
文章被收录于专栏:技术杂记技术杂记
运行总次数:0
代码可运行

pretty 参数,可以使输出更清晰

查来自 Buffalo

代码语言:javascript
代码运行次数:0
复制
[root@h102 ~]# curl -XGET 'localhost:9200/logstash-2015.12.23/_search?q=geoip.city_name=Buffalo&pretty'
{
  "took" : 4,
  "timed_out" : false,
  "_shards" : {
    "total" : 5,
    "successful" : 5,
    "failed" : 0
  },
  "hits" : {
    "total" : 1,
    "max_score" : 1.0520113,
    "hits" : [ {
      "_index" : "logstash-2015.12.23",
      "_type" : "logs",
      "_id" : "AVHPFlOg70zKhyBEHGi1",
      "_score" : 1.0520113,
      "_source":{"message":"108.174.55.234 - - [04/Jan/2015:05:27:45 +0000] \"GET /?flav=rss20 HTTP/1.1\" 200 29941 \"-\" \"-\"","@version":"1","@timestamp":"2015-12-23T13:45:22.929Z","host":"h102.temp","path":"/root/logstash/logstash-tutorial.log","clientip":"108.174.55.234","ident":"-","auth":"-","timestamp":"04/Jan/2015:05:27:45 +0000","verb":"GET","request":"/?flav=rss20","httpversion":"1.1","response":"200","bytes":"29941","referrer":"\"-\"","agent":"\"-\"","geoip":{"ip":"108.174.55.234","country_code2":"US","country_code3":"USA","country_name":"United States","continent_code":"NA","region_name":"NY","city_name":"Buffalo","postal_code":"14221","latitude":42.9864,"longitude":-78.7279,"dma_code":514,"area_code":716,"timezone":"America/New_York","real_region_name":"New York","location":[-78.7279,42.9864]}}
    } ]
  }
}
[root@h102 ~]# 

本文系转载,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文系转载前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档