diff --git a/src/Agent/AutopilotMonitor.Agent.Core/Monitoring/Collectors/NetworkChangeDetector.cs b/src/Agent/AutopilotMonitor.Agent.Core/Monitoring/Collectors/NetworkChangeDetector.cs index 4585b575..224f2837 100644 --- a/src/Agent/AutopilotMonitor.Agent.Core/Monitoring/Collectors/NetworkChangeDetector.cs +++ b/src/Agent/AutopilotMonitor.Agent.Core/Monitoring/Collectors/NetworkChangeDetector.cs @@ -226,10 +226,13 @@ namespace AutopilotMonitor.Agent.Core.Monitoring.Collectors // Build endpoint list: static MDM endpoints + dynamic backend URL var endpoints = new List<(string Name, string Url)>(MdmEndpoints); - if (!string.IsNullOrEmpty(_apiBaseUrl)) - { - endpoints.Add(("Autopilot Monitor API", _apiBaseUrl)); - } + // Optionally add the Autopilot Monitor API endpoint, but we don't want to cause false alarms if it's down or unreachable, + // since it's not critical for enrollment success and may be available only after certain network changes (e.g. if it's behind a captive portal). + // For now, we can omit it from the critical checks. + // if (!string.IsNullOrEmpty(_apiBaseUrl)) + // { + // endpoints.Add(("Autopilot Monitor API", _apiBaseUrl)); + // } // Run all checks in parallel var tasks = endpoints.Select(ep => CheckEndpointAsync(ep.Name, ep.Url)).ToArray(); diff --git a/src/Agent/AutopilotMonitor.Agent/buildcounter.txt b/src/Agent/AutopilotMonitor.Agent/buildcounter.txt index 534b992c..515f19a5 100644 --- a/src/Agent/AutopilotMonitor.Agent/buildcounter.txt +++ b/src/Agent/AutopilotMonitor.Agent/buildcounter.txt @@ -1 +1 @@ -453 +454