mirror of
https://github.com/koichixD/uptime-kuma.git
synced 2026-09-04 09:13:21 +00:00
feat: Add 'local service' monitor type
This adds a new monitor type to check local services by executing a shell command. It also includes fixes for Prometheus errors when adding new tags and for the UI not updating when tags are changed.
This commit is contained in:
@@ -900,6 +900,9 @@ let needSetup = false;
|
||||
bean.rabbitmqPassword = monitor.rabbitmqPassword;
|
||||
bean.conditions = JSON.stringify(monitor.conditions);
|
||||
bean.manual_status = monitor.manual_status;
|
||||
bean.local_service_command = monitor.local_service_command;
|
||||
bean.local_service_expected_output = monitor.local_service_expected_output;
|
||||
bean.local_service_check_type = monitor.local_service_check_type;
|
||||
|
||||
// ping advanced options
|
||||
bean.ping_numeric = monitor.ping_numeric;
|
||||
@@ -1173,6 +1176,8 @@ let needSetup = false;
|
||||
bean.color = tag.color;
|
||||
await R.store(bean);
|
||||
|
||||
await Prometheus.init();
|
||||
|
||||
callback({
|
||||
ok: true,
|
||||
tag: await bean.toJSON(),
|
||||
@@ -1248,6 +1253,8 @@ let needSetup = false;
|
||||
value,
|
||||
]);
|
||||
|
||||
await server.sendUpdateMonitorIntoList(socket, monitorID);
|
||||
|
||||
callback({
|
||||
ok: true,
|
||||
msg: "successAdded",
|
||||
@@ -1272,6 +1279,8 @@ let needSetup = false;
|
||||
monitorID,
|
||||
]);
|
||||
|
||||
await server.sendUpdateMonitorIntoList(socket, monitorID);
|
||||
|
||||
callback({
|
||||
ok: true,
|
||||
msg: "successEdited",
|
||||
@@ -1296,6 +1305,8 @@ let needSetup = false;
|
||||
value,
|
||||
]);
|
||||
|
||||
await server.sendUpdateMonitorIntoList(socket, monitorID);
|
||||
|
||||
callback({
|
||||
ok: true,
|
||||
msg: "successDeleted",
|
||||
|
||||
Reference in New Issue
Block a user