|
|
|
@ -16,9 +16,9 @@ load_dotenv()
|
|
|
|
|
|
|
|
|
|
route_bp = Blueprint('route', __name__)
|
|
|
|
|
|
|
|
|
|
cpu_alarm_threshold = os.getenv('CPU_ALARM_THRESHOLD', 70)
|
|
|
|
|
io_alarm_threshold = os.getenv('IO_ALARM_THRESHOLD', 70)
|
|
|
|
|
memory_alarm_threshold = os.getenv('MEMORY_ALARM_THRESHOLD', 70)
|
|
|
|
|
cpu_alarm_threshold = float(os.getenv('CPU_ALARM_THRESHOLD', '70'))
|
|
|
|
|
io_alarm_threshold = float(os.getenv('IO_ALARM_THRESHOLD', '70'))
|
|
|
|
|
memory_alarm_threshold = float(os.getenv('MEMORY_ALARM_THRESHOLD', '70'))
|
|
|
|
|
# 资源使用情况
|
|
|
|
|
@route_bp.route('/api/sys/resource', methods=['GET'])
|
|
|
|
|
def get_resource():
|
|
|
|
|