diff --git a/sql/pg_data.sql b/sql/pg_data.sql index 7ae9f38..c528c44 100644 --- a/sql/pg_data.sql +++ b/sql/pg_data.sql @@ -2,6 +2,6 @@ delete from isop_diting.tb_cep_attr where attr_name = 'trojan_type'; delete from isop_diting.tb_cep_attr where attr_name = 'account'; delete from isop_diting.tb_cep_attr where attr_name = 'worm_family'; -delete from isop_diting.tb_cep_attr where attr_name = 'interface'; +delete from isop_diting.tb_cep_attr where attr_name = 'service_name'; INSERT INTO isop_diting.tb_cep_attr (attr_name, attr_type, is_system,is_common) -VALUES ('trojan_type', 'String', '1','1'),('interface', 'String','1','1'),('worm_family', 'String','1','1'),('account', 'String','1','1'); +VALUES ('trojan_type', 'String', '1','1'),('service_name', 'String','1','1'),('worm_family', 'String','1','1'),('account', 'String','1','1'); \ No newline at end of file diff --git a/utils/base_dataclean_pg.py b/utils/base_dataclean_pg.py index f1a02d7..4c69a6b 100644 --- a/utils/base_dataclean_pg.py +++ b/utils/base_dataclean_pg.py @@ -134,7 +134,7 @@ def get_interface_group_data(index,startTime,endTime,diplist): "composite": { "size": size, "sources": [ - {"interface": { "terms": {"field": "interface"} }}, + {"service_name": { "terms": {"field": "service_name"} }}, {"sip": { "terms": { "field": "sip"}}}, {"account": { "terms": { "field": "account"}}}, {"trojan_type": { "terms": { "field": "trojan_type"}}} @@ -156,7 +156,7 @@ def get_interface_group_data(index,startTime,endTime,diplist): "account": bucket['key']['account'], "count": bucket['doc_count'], "jobnum": bucket['key']['trojan_type'] , - "interface": bucket['key']['interface'] , + "interface": bucket['key']['service_name'] , "ip":bucket['key']['sip'] } datas.append(data)