Last active
August 21, 2018 05:34
-
-
Save Howard-Chang/e0c1ba601453087e1f943e32df6dc4f8 to your computer and use it in GitHub Desktop.
慈濟科大syslog REST API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#top10 protocol name | |
GET _search | |
{ | |
"size" : 0, | |
"query": { | |
"bool": { | |
"should": [ | |
{ | |
"term":{"IPV4_SRC_ADDR":"203.68.62.36"} | |
}, | |
{ | |
"term":{"IPV4_DST_ADDR":"203.68.62.36"} | |
} | |
],"minimum_should_match": 1, | |
"must":[ | |
{ | |
"range":{ | |
"@timestamp":{ | |
"gte":"now-1d" | |
} | |
} | |
} | |
] | |
} | |
}, | |
"aggs": { | |
"genres":{ | |
"terms" : { | |
"field" : "L7_PROTO_NAME.keyword" | |
} | |
} | |
} | |
} | |
#level=alert | |
GET _search | |
{ | |
"_source": { "includes": ["level","action","msg","ref","IPV4_SRC_ADDR","IPV4_DST_ADDR"]}, | |
"query": { | |
"bool": { | |
"must":[ | |
{ | |
"range":{ | |
"@timestamp":{ | |
"gte":"now-1d" | |
} | |
} | |
}, | |
{ | |
"term":{"level":"alert"} | |
} | |
] | |
} | |
} | |
} | |
#使用P2P軟體的IP | |
GET _search | |
{ | |
"_source": { "includes": ["IPV4_SRC_ADDR","IPV4_DST_ADDR","L7_PROTO_NAME","action"]}, | |
"query": { | |
"bool": { | |
"must":[ | |
{ | |
"range":{ | |
"@timestamp":{ | |
"gte":"now-1d" | |
} | |
} | |
}, | |
{ | |
"term":{"appcat.keyword":"P2P"} | |
} | |
] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment