mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-03-11 15:34:56 +00:00
lib/promscrape/discovery: properly track vm_promscrape_discovery_kubernetes_objects_removed_total metric
This commit is contained in:
parent
a939667ce0
commit
d1d34664b5
1 changed files with 2 additions and 2 deletions
|
@ -23,7 +23,7 @@ import (
|
|||
"github.com/VictoriaMetrics/metrics"
|
||||
)
|
||||
|
||||
var apiServerTimeout = flag.Duration("promscrape.kubernetes.apiServerTimeout", 10*time.Minute, "How frequently to reload the full state from Kuberntes API server")
|
||||
var apiServerTimeout = flag.Duration("promscrape.kubernetes.apiServerTimeout", 30*time.Minute, "How frequently to reload the full state from Kuberntes API server")
|
||||
|
||||
// apiConfig contains config for API server
|
||||
type apiConfig struct {
|
||||
|
@ -367,8 +367,8 @@ func (uw *urlWatcher) reloadObjects() string {
|
|||
}
|
||||
}
|
||||
uw.mu.Lock()
|
||||
uw.objectsRemoved.Add(-len(uw.objectsByKey))
|
||||
uw.objectsAdded.Add(len(objectsByKey))
|
||||
uw.objectsRemoved.Add(len(uw.objectsByKey))
|
||||
uw.objectsCount.Add(len(objectsByKey) - len(uw.objectsByKey))
|
||||
uw.objectsByKey = objectsByKey
|
||||
uw.swosByKey = swosByKey
|
||||
|
|
Loading…
Reference in a new issue