mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
Enhance server monitor functionality by adding serverMonitorResponse handling and improving hostname resolution
This commit is contained in:
@@ -418,6 +418,7 @@ export default class MonitorResourceUtil {
|
||||
logger.debug(
|
||||
`${dataToProcess.monitorId.toString()} - Processing monitor step...`,
|
||||
);
|
||||
|
||||
response = await MonitorResourceUtil.processMonitorStep({
|
||||
dataToProcess: dataToProcess,
|
||||
monitorStep: monitorStep,
|
||||
|
||||
@@ -41,7 +41,7 @@ for i in "${!BINARIES[@]}"; do
|
||||
ARCH="${ARCHES[$i]}"
|
||||
WXS_INPUT_FILE="./windows/app-$ARCH-template.wxs"
|
||||
WXS_OUTPUT_FILE="./windows/app-$ARCH.wxs"
|
||||
MSI_FILE="$OUTPUT_DIR/$APP_NAME-$APP_VERSION-$ARCH.msi"
|
||||
MSI_FILE="$OUTPUT_DIR/$APP_NAME-$ARCH.msi"
|
||||
|
||||
# log binary and arch
|
||||
echo "Building MSI for binary: $BINARY and arch: $ARCH"
|
||||
|
||||
@@ -32,6 +32,7 @@ RunCron(
|
||||
monitorSteps: true,
|
||||
serverMonitorRequestReceivedAt: true,
|
||||
createdAt: true,
|
||||
serverMonitorResponse: true,
|
||||
},
|
||||
limit: LIMIT_MAX,
|
||||
skip: 0,
|
||||
@@ -53,8 +54,8 @@ RunCron(
|
||||
monitorId: monitor.id!,
|
||||
onlyCheckRequestReceivedAt: true,
|
||||
requestReceivedAt:
|
||||
monitor.serverMonitorRequestReceivedAt || monitor.createdAt!,
|
||||
hostname: "",
|
||||
monitor.serverMonitorRequestReceivedAt || monitor.serverMonitorResponse?.requestReceivedAt || monitor.createdAt!,
|
||||
hostname: monitor.serverMonitorResponse?.hostname || "",
|
||||
};
|
||||
|
||||
await MonitorResourceUtil.monitorResource(serverMonitorResponse);
|
||||
|
||||
Reference in New Issue
Block a user