Add promehteus metric about leader election status
This commit is contained in:
parent
476d0106d6
commit
7c717cabcf
4 changed files with 42 additions and 0 deletions
|
|
@ -269,8 +269,12 @@ func (n *NGINXController) Start() {
|
|||
if n.syncStatus != nil {
|
||||
go n.syncStatus.Run(stopCh)
|
||||
}
|
||||
|
||||
n.metricCollector.OnStartedLeading(n.cfg.ElectionID)
|
||||
},
|
||||
OnStoppedLeading: func() {
|
||||
n.metricCollector.OnStoppedLeading(n.cfg.ElectionID)
|
||||
|
||||
// Remove prometheus metrics related to SSL certificates
|
||||
srvs := sets.NewString()
|
||||
for _, s := range n.runningConfig.Servers {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue