forked from DGNum/uptime-kuma-api
fix monitor
This commit is contained in:
parent
140784c4e0
commit
74d2480181
1 changed files with 12 additions and 9 deletions
|
@ -102,7 +102,7 @@ def _build_monitor_data(
|
||||||
"keyword": keyword,
|
"keyword": keyword,
|
||||||
})
|
})
|
||||||
|
|
||||||
# if type_ in [MonitorType.HTTP, MonitorType.KEYWORD]:
|
# HTTP, KEYWORD
|
||||||
data.update({
|
data.update({
|
||||||
"url": url,
|
"url": url,
|
||||||
"certificate_expiry_notification": certificate_expiry_notification,
|
"certificate_expiry_notification": certificate_expiry_notification,
|
||||||
|
@ -128,23 +128,23 @@ def _build_monitor_data(
|
||||||
"auth_workstation": auth_workstation,
|
"auth_workstation": auth_workstation,
|
||||||
})
|
})
|
||||||
|
|
||||||
# if type_ in [MonitorType.DNS, MonitorType.PING, MonitorType.STEAM, MonitorType.MQTT]:
|
# DNS, PING, STEAM, MQTT
|
||||||
data.update({
|
data.update({
|
||||||
"hostname": hostname,
|
"hostname": hostname,
|
||||||
})
|
})
|
||||||
|
|
||||||
if type_ in [MonitorType.DNS, MonitorType.STEAM, MonitorType.MQTT]:
|
# DNS, STEAM, MQTT
|
||||||
data.update({
|
data.update({
|
||||||
"port": port,
|
"port": port,
|
||||||
})
|
})
|
||||||
|
|
||||||
# if type_ == MonitorType.DNS:
|
# DNS
|
||||||
data.update({
|
data.update({
|
||||||
"dns_resolve_server": dns_resolve_server,
|
"dns_resolve_server": dns_resolve_server,
|
||||||
"dns_resolve_type": dns_resolve_type,
|
"dns_resolve_type": dns_resolve_type,
|
||||||
})
|
})
|
||||||
|
|
||||||
# if type_ == MonitorType.MQTT:
|
# MQTT
|
||||||
data.update({
|
data.update({
|
||||||
"mqtt_username": mqtt_username,
|
"mqtt_username": mqtt_username,
|
||||||
"mqtt_password": mqtt_password,
|
"mqtt_password": mqtt_password,
|
||||||
|
@ -152,9 +152,12 @@ def _build_monitor_data(
|
||||||
"mqtt_success_message": mqtt_success_message,
|
"mqtt_success_message": mqtt_success_message,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
# SQLSERVER
|
||||||
|
data.update({
|
||||||
|
"sqlserver_connection_string": sqlserver_connection_string
|
||||||
|
})
|
||||||
if type_ == MonitorType.SQLSERVER:
|
if type_ == MonitorType.SQLSERVER:
|
||||||
data.update({
|
data.update({
|
||||||
"sqlserver_connection_string": sqlserver_connection_string,
|
|
||||||
"sqlserver_query": sqlserver_query,
|
"sqlserver_query": sqlserver_query,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue