monitorconfig
This commit is contained in:
@@ -22,13 +22,24 @@ import platform
|
||||
|
||||
from modules.monitor_config.repository import (
|
||||
find_monitor_config_by_device_id,
|
||||
update_monitor_config_db
|
||||
update_monitor_config_db,
|
||||
insert_default_monitor_config_db
|
||||
)
|
||||
from modules.monitor_config.exceptions import MonitorConfigNotFoundException
|
||||
from modules.device.repository import find_device_by_id
|
||||
from modules.device.exceptions import DeviceNotFoundException
|
||||
from scheduler.scheduler import reschedule_device_monitoring_job
|
||||
|
||||
|
||||
# ============================================
|
||||
# CREATE DEFAULT: Tạo cấu hình giám sát mặc định (Service Layer)
|
||||
# ============================================
|
||||
def create_default_monitor_config_service(device_id, cursor=None):
|
||||
"""
|
||||
Tạo cấu hình giám sát mặc định cho thiết bị mới.
|
||||
"""
|
||||
return insert_default_monitor_config_db(device_id, cursor)
|
||||
|
||||
# ============================================
|
||||
# Dynamic Import: icmplib và pysnmp
|
||||
# ============================================
|
||||
|
||||
Reference in New Issue
Block a user