Yang 3 months ago
parent bde11596e4
commit 8b5d28b7e3
  1. 30
      utils/base_dataclean_pg.py

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

Loading…
Cancel
Save