forked from TrueCloudLab/frostfs-node
[#125] ir: Reconfigure pprof and metrics on SIGHUP
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
parent
a181c9e434
commit
800eb5e983
9 changed files with 154 additions and 80 deletions
21
cmd/frostfs-ir/metrics.go
Normal file
21
cmd/frostfs-ir/metrics.go
Normal file
|
@ -0,0 +1,21 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/metrics"
|
||||
)
|
||||
|
||||
const (
|
||||
prometheusEnabledKey = "prometheus.enabled"
|
||||
prometheusAddressKey = "prometheus.address"
|
||||
prometheusShutdownTimeoutKey = "prometheus.shutdown_timeout"
|
||||
)
|
||||
|
||||
func newMetricsComponent() *httpComponent {
|
||||
return &httpComponent{
|
||||
name: "prometheus",
|
||||
enabledKey: prometheusEnabledKey,
|
||||
addressKey: prometheusAddressKey,
|
||||
shutdownTimeoutKey: prometheusShutdownTimeoutKey,
|
||||
handler: metrics.Handler(),
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue