Revert "prometheus: active worker gauge"
This reverts commit 68bc8e0c88.
This commit is contained in:
parent
55439fc6d3
commit
4bb61da37e
2 changed files with 0 additions and 26 deletions
|
|
@ -1,23 +0,0 @@
|
|||
package prometheus
|
||||
|
||||
import (
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/prometheus/client_golang/prometheus/promauto"
|
||||
)
|
||||
|
||||
var (
|
||||
ActiveWorkers = promauto.NewGaugeVec(prometheus.GaugeOpts{
|
||||
Name: "active_workers",
|
||||
Namespace: Namespace,
|
||||
Subsystem: WorkerSubsystem,
|
||||
Help: "Active workers",
|
||||
}, []string{"worker", "tenant", "arch"})
|
||||
)
|
||||
|
||||
func AddActiveWorker(worker, tenant, arch string) {
|
||||
ActiveWorkers.WithLabelValues(worker, tenant, arch).Inc()
|
||||
}
|
||||
|
||||
func RemoveActiveWorker(worker, tenant, arch string) {
|
||||
ActiveWorkers.WithLabelValues(worker, tenant, arch).Dec()
|
||||
}
|
||||
|
|
@ -168,9 +168,7 @@ func (s *Server) WatchWorkers() {
|
|||
err = s.jobs.DeleteWorker(w.ID)
|
||||
if err != nil {
|
||||
logrus.Warningf("Unable to remove worker: %v", err)
|
||||
continue
|
||||
}
|
||||
prometheus.RemoveActiveWorker(w.ID.String(), w.Channel, w.Arch)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -830,7 +828,6 @@ func (s *Server) RegisterWorker(c, a string) (uuid.UUID, error) {
|
|||
if err != nil {
|
||||
return uuid.Nil, err
|
||||
}
|
||||
prometheus.AddActiveWorker(workerID.String(), c, a)
|
||||
logrus.Infof("Worker (%v) registered", a)
|
||||
return workerID, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue