|
|
|
@ -160,24 +160,24 @@ def get_interface_group_data(index,startTime,endTime): |
|
|
|
|
## 菜单维度 |
|
|
|
|
def get_menu_group_data(index,startTime,endTime): |
|
|
|
|
query_body={ |
|
|
|
|
"size": 0, |
|
|
|
|
"query": { |
|
|
|
|
"range": {"timestamp": {"gte": startTime,"lte": endTime}} |
|
|
|
|
}, |
|
|
|
|
"aggs": { |
|
|
|
|
"composite_buckets": { |
|
|
|
|
"composite": { |
|
|
|
|
"size": size, |
|
|
|
|
"sources": [ |
|
|
|
|
{"worm_family": { "terms": {"field": "worm_family"} }}, |
|
|
|
|
{"sip": { "terms": { "field": "sip"}}}, |
|
|
|
|
{"account": { "terms": { "field": "account"}}}, |
|
|
|
|
{"trojan_type": { "terms": { "field": "trojan_type"}}}, |
|
|
|
|
] |
|
|
|
|
"size": 0, |
|
|
|
|
"query": { |
|
|
|
|
"range": {"timestamp": {"gte": startTime,"lte": endTime}} |
|
|
|
|
}, |
|
|
|
|
"aggs": { |
|
|
|
|
"composite_buckets": { |
|
|
|
|
"composite": { |
|
|
|
|
"size": size, |
|
|
|
|
"sources": [ |
|
|
|
|
{"worm_family": { "terms": {"field": "worm_family"} }}, |
|
|
|
|
{"sip": { "terms": { "field": "sip"}}}, |
|
|
|
|
{"account": { "terms": { "field": "account"}}}, |
|
|
|
|
{"trojan_type": { "terms": { "field": "trojan_type"}}}, |
|
|
|
|
] |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
after_key = None |
|
|
|
|
es_util_instance = EsUtil() |
|
|
|
|
datas=[] |
|
|
|
|