forked from TrueCloudLab/frostfs-node
[#1602] config: Enable metrics
and profiler
services with a flag
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
12dc5c3395
commit
ac46d1a11f
16 changed files with 53 additions and 15 deletions
|
@ -13,9 +13,17 @@ const (
|
|||
ShutdownTimeoutDefault = 30 * time.Second
|
||||
|
||||
// AddressDefault is a default value for metrics HTTP service endpoint.
|
||||
AddressDefault = ""
|
||||
AddressDefault = "localhost:9090"
|
||||
)
|
||||
|
||||
// Enabled returns the value of "enabled" config parameter
|
||||
// from "metrics" section.
|
||||
//
|
||||
// Returns false if the value is missing or invalid.
|
||||
func Enabled(c *config.Config) bool {
|
||||
return config.BoolSafe(c.Sub(subsection), "enabled")
|
||||
}
|
||||
|
||||
// ShutdownTimeout returns the value of "shutdown_timeout" config parameter
|
||||
// from "metrics" section.
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue