diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 453d3294..e787294f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -25,8 +25,8 @@ jobs: with: # command: manifest # bootstrap-sha: ad2255c9c24f68d0adb5255159fa5a849ab880e4 - last-release-sha: 849ed9960e22951f988050533ce1cf6e8ee29bb7 - release-as: 9.3.0 + # last-release-sha: 849ed9960e22951f988050533ce1cf6e8ee29bb7 + # release-as: 9.3.0 release-type: node package-name: butler default-branch: master diff --git a/src/lib/service_monitor.js b/src/lib/service_monitor.js index 543a7c3f..411b3514 100644 --- a/src/lib/service_monitor.js +++ b/src/lib/service_monitor.js @@ -159,7 +159,10 @@ const verifyServicesExist = async (config, logger) => { return result; }; -const checkServiceStatus = async (config, logger) => { +// Function to check the status of all Windows services specified in the config file +// The isFirsCheck parameter is used to determine if we should send a message to the alert destinations +// Set isFirsCheck default to false +const checkServiceStatus = async (config, logger, isFirstCheck = false) => { const hostsToCheck = config.get('Butler.serviceMonitor.monitor'); hostsToCheck.forEach(async (host) => { @@ -549,7 +552,7 @@ async function setupServiceMonitorTimer(config, logger) { }, sched); // Do an initial service status check - checkServiceStatus(config, logger); + checkServiceStatus(config, logger, true); } } else { logger.error(