|
|
@ -42,6 +42,7 @@ import (
|
|
|
|
"github.com/mwitkow/go-conntrack"
|
|
|
|
"github.com/mwitkow/go-conntrack"
|
|
|
|
"github.com/oklog/run"
|
|
|
|
"github.com/oklog/run"
|
|
|
|
"github.com/prometheus/client_golang/prometheus"
|
|
|
|
"github.com/prometheus/client_golang/prometheus"
|
|
|
|
|
|
|
|
"github.com/prometheus/client_golang/prometheus/collectors"
|
|
|
|
versioncollector "github.com/prometheus/client_golang/prometheus/collectors/version"
|
|
|
|
versioncollector "github.com/prometheus/client_golang/prometheus/collectors/version"
|
|
|
|
"github.com/prometheus/common/model"
|
|
|
|
"github.com/prometheus/common/model"
|
|
|
|
"github.com/prometheus/common/promlog"
|
|
|
|
"github.com/prometheus/common/promlog"
|
|
|
@ -252,6 +253,18 @@ func main() {
|
|
|
|
newFlagRetentionDuration model.Duration
|
|
|
|
newFlagRetentionDuration model.Duration
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Unregister the default GoCollector, and reregister with our defaults.
|
|
|
|
|
|
|
|
if prometheus.Unregister(collectors.NewGoCollector()) {
|
|
|
|
|
|
|
|
prometheus.MustRegister(
|
|
|
|
|
|
|
|
collectors.NewGoCollector(
|
|
|
|
|
|
|
|
collectors.WithGoCollectorRuntimeMetrics(
|
|
|
|
|
|
|
|
collectors.MetricsGC,
|
|
|
|
|
|
|
|
collectors.MetricsScheduler,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
cfg := flagConfig{
|
|
|
|
cfg := flagConfig{
|
|
|
|
notifier: notifier.Options{
|
|
|
|
notifier: notifier.Options{
|
|
|
|
Registerer: prometheus.DefaultRegisterer,
|
|
|
|
Registerer: prometheus.DefaultRegisterer,
|
|
|
|