Add tlsconmon component

This commit is contained in:
2025-05-24 02:11:35 +02:00
parent e40cfed4f0
commit 4a31b9fc4b
5 changed files with 215 additions and 3 deletions

View File

@@ -62,6 +62,8 @@ func (sm *StepMonitor) Start() {
} else {
stepCertError.WithLabelValues(sm.RootID).Set(0)
}
secondsLeft := time.Until(sm.certificate.NotAfter).Seconds()
stepCertTimeLeft.WithLabelValues(sm.RootID).Set(secondsLeft)
timerCertFetch := time.NewTimer(5 * time.Minute)
defer timerCertFetch.Stop()
@@ -87,7 +89,6 @@ func (sm *StepMonitor) Start() {
timerUpdateMonitor.Reset(1 * time.Second)
case <-sm.shutdownCh:
close(sm.shutdownCh)
sm.shutdownComplete <- struct{}{}
return
}
@@ -96,6 +97,8 @@ func (sm *StepMonitor) Start() {
func (sm *StepMonitor) Shutdown() error {
sm.shutdownCh <- struct{}{}
close(sm.shutdownCh)
<-sm.shutdownComplete
close(sm.shutdownComplete)
sm.logger.Info("Monitoring stopped")