internal/aggergate: make HLL state path configurable
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I8ff8ef25ad945aae918bea97ee39d7ea6a6a6964
This commit is contained in:
parent
f988174145
commit
2ef2dabf93
5 changed files with 167 additions and 63 deletions
|
|
@ -83,6 +83,7 @@ type ServerConfig struct {
|
|||
ListenAddr string `yaml:"listen_addr"`
|
||||
MetricsPath string `yaml:"metrics_path"`
|
||||
IngestionPath string `yaml:"ingestion_path"`
|
||||
StatePath string `yaml:"state_path"` // path to persist HLL state
|
||||
}
|
||||
|
||||
// YAML configuration file
|
||||
|
|
@ -170,6 +171,9 @@ func (c *Config) Validate() error {
|
|||
if c.Server.IngestionPath == "" {
|
||||
c.Server.IngestionPath = "/api/event"
|
||||
}
|
||||
if c.Server.StatePath == "" {
|
||||
c.Server.StatePath = "/var/lib/watchdog/hll.state"
|
||||
}
|
||||
|
||||
if c.Security.MetricsAuth.Enabled {
|
||||
if c.Security.MetricsAuth.Username == "" || c.Security.MetricsAuth.Password == "" {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue