diff options
Diffstat (limited to 'configd/src/apps/sentinel/service.cpp')
-rw-r--r-- | configd/src/apps/sentinel/service.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/configd/src/apps/sentinel/service.cpp b/configd/src/apps/sentinel/service.cpp index 2f13a05eb4f..3c762a957ec 100644 --- a/configd/src/apps/sentinel/service.cpp +++ b/configd/src/apps/sentinel/service.cpp @@ -239,6 +239,7 @@ Service::start() // ensureChildRuns(pipes[0]); // This will wait until the execl goes through setState(RUNNING); _metrics.currentlyRunningServices++; + _metrics.sentinel_running.sample(_metrics.currentlyRunningServices); close(pipes[0]); // close reading end using ns_log::LLParser; @@ -314,6 +315,7 @@ Service::youExited(int status) setState(FAILED); } _metrics.currentlyRunningServices--; + _metrics.sentinel_running.sample(_metrics.currentlyRunningServices); if (_state == TERMINATING) { setState(TERMINATED); @@ -326,6 +328,7 @@ Service::youExited(int status) setState(READY); _metrics.totalRestartsCounter++; _metrics.totalRestartsLastPeriod++; + _metrics.sentinel_restarts.add(); start(); } } |