sh graylog查询

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh graylog查询相关的知识,希望对你有一定的参考价值。

$ curl localhost:9200/_search?q=title:graylog2&pretty=true


$ curl 'localhost:9200/_cat/indices?v'


$ curl -XGET 'http://localhost:9200/graylog2_6/_search?pretty=true' -d '
{ 
    "query" : { 
        "matchAll" : {}  
    }   
}'

$ curl -XGET 'http://localhost:9200/_search?pretty=true' -d '
{ 
    "query" : { 
        "matchAll" : {}  
    }   
}'


$ curl -XGET 'http://localhost:9200/.marvel-2016.05.20/_search?pretty=true' -d '
{ 
    "query" : { 
        "matchAll" : {}  
    }   
}'

$ curl -XGET 'http://localhost:9200/.marvel-2016.06.04/_search?pretty=true' -d '
{ 
    "query" : { 
        "matchAll" : {}  
    }   
}'

$ curl -XGET 'http://localhost:9200/graylog2_0/_search?pretty=true' -d '
{ 
    "query" : { 
        "match" : {"_type":"message"}  
    }   
}'

$ curl -XGET 'http://localhost:9200/graylog2_4/_search?pretty=true' -d '
{ 
    "query" : { 
        "match" : {"gl2_source_collector":"i-d6ea1c79"}  
    }   
}'


$ curl -XGET 'http://localhost:9200/graylog2_0,graylog2_1,graylog2_2,graylog2_3,graylog2_4,graylog2_5,graylog2_6,graylog2_7,graylog2_8,graylog2_9,graylog2_10,graylog2_11,graylog2_13,graylog2_14/_search?pretty=true' -d '
 { 
     "query" : { 
         "match" : {"gl2_source_collector":"i-d6ea1c79"}  
     }   
 }'
 

$ curl -XGET 'http://localhost:9200/graylog2_0,graylog2_1,graylog2_2,graylog2_3,graylog2_4,graylog2_5,graylog2_6,graylog2_7,graylog2_8,graylog2_9,graylog2_10,graylog2_11,graylog2_13,graylog2_14/_search?pretty=true' -d '
 { 
     "query" : { 
         "match" : {"gl2_source_collector":"i-3ac637fd"}  
     }   
 }'


$ curl -XGET 'http://localhost:9200/graylog2_0,graylog2_1,graylog2_2,graylog2_3,graylog2_4,graylog2_5,graylog2_6,graylog2_7,graylog2_8,graylog2_9,graylog2_10,graylog2_11,graylog2_13,graylog2_14/_search?pretty=true' -d '
 { 
     "query" : { 
         "matchAll" : {}  
     }   
 }'


#"source": "ip-172-28-198-149","gl2_source_collector":"i-d6ea1c79"

$curl -XGET 'http://localhost:9200/graylog2_0,graylog2_1,graylog2_2,graylog2_3,graylog2_4,graylog2_5,graylog2_6,graylog2_7,graylog2_8,graylog2_9,graylog2_10,graylog2_11,graylog2_13,graylog2_14/_search?pretty=true' -d '
 { 
     "query" : { 
         "match" : {"source": "ip-172-28-198-149"}  
     }   
 }'

以上是关于sh graylog查询的主要内容,如果未能解决你的问题,请参考以下文章

sh docker graylog服务器allinone

sh docker graylog服务器allinone

sh RHEL / CentOS 6的graylog2安装脚本

graylog查询语法

graylog查询语法

graylog查询语法