diff --git a/flask-consul/units/cloud/awscloud.py b/flask-consul/units/cloud/awscloud.py index ad8d7a8..cd570e7 100644 --- a/flask-consul/units/cloud/awscloud.py +++ b/flask-consul/units/cloud/awscloud.py @@ -11,7 +11,7 @@ def exp(account,collect_days,notify_days,notify_amount): def group(account): try: - now = datetime.datetime.now().strftime('%m.%d/%H:%M') + 现在 = datetime.datetime.now().strftime('%m.%d/%H:%M') group_dict = {"1": "1"} # AWS没有资产组概念 consul_kv.put_kv(f'ConsulManager/assets/awscloud/group/{account}',group_dict) count = len(group_dict) @@ -60,7 +60,7 @@ def ecs(account,region,isextip=False): ecs_dict_temp[InstanceId]["status"] = instances["State"]["Name"] ecs_dict_temp[InstanceId]["region"] = region ecs_dict_temp[InstanceId]["ip"] = instances["PrivateIpAddress"] - ecs_dict_temp[InstanceId]["cpu"] = f'{instances["CpuOptions"]["CoreCount"]}核' + ecs_dict_temp[InstanceId]["cpu"] = f'{instances["CpuOptions"]["CoreCount"]*instances["CpuOptions"]["ThreadsPerCore"]}核' ecs_dict_temp[InstanceId]["mem"] = "无" ecs_dict_temp[InstanceId]["exp"] = "按量" # AWS仅按量 if isextip: