summaryrefslogtreecommitdiff
path: root/src/mongo/db/process_health/progress_monitor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/process_health/progress_monitor.cpp')
-rw-r--r--src/mongo/db/process_health/progress_monitor.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/db/process_health/progress_monitor.cpp b/src/mongo/db/process_health/progress_monitor.cpp
index 75fdd4f93c1..7c2fd4fe221 100644
--- a/src/mongo/db/process_health/progress_monitor.cpp
+++ b/src/mongo/db/process_health/progress_monitor.cpp
@@ -65,7 +65,7 @@ void ProgressMonitor::progressMonitorCheck(std::function<void(std::string cause)
// Check the liveness of every health observer.
for (auto observer : observers) {
const auto stats = observer->getStats();
- if (!stats.isEnabled) {
+ if (!_faultManager->getConfig().isHealthObserverEnabled(observer->getType())) {
continue;
}
@@ -96,7 +96,8 @@ void ProgressMonitor::progressMonitorCheck(std::function<void(std::string cause)
sleepFor(_faultManager->getConfig().getPeriodicHealthCheckInterval() * 2);
for (auto observer : secondPass) {
const auto stats = observer->getStats();
- if (stats.isEnabled && !stats.currentlyRunningHealthCheck &&
+ if (!_faultManager->getConfig().isHealthObserverEnabled(observer->getType()) &&
+ !stats.currentlyRunningHealthCheck &&
now - stats.lastTimeCheckStarted >
_faultManager->getConfig().getPeriodicLivenessDeadline() * 2) {
// Crash because this health checker was never started.