Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Database database.Config `yaml:"database"`
Redis redis.Config `yaml:"redis"`
Logging logging.Config `yaml:"logging"`
Retention RetentionConfig `yaml:"retention"`
}
Config defines Icinga DB config.
func (*Config) SetDefaults ¶
func (c *Config) SetDefaults()
type Flags ¶
type Flags struct {
// Version decides whether to just print the version and exit.
Version bool `long:"version" description:"print version and exit"`
// Config is the path to the config file
Config string `short:"c" long:"config" description:"path to config file" required:"true" default:"/etc/icingadb/config.yml"`
}
Flags defines CLI flags.
type RetentionConfig ¶
type RetentionConfig struct {
HistoryDays uint16 `yaml:"history-days"`
SlaDays uint16 `yaml:"sla-days"`
Interval time.Duration `yaml:"interval" default:"1h"`
Count uint64 `yaml:"count" default:"5000"`
Options history.RetentionOptions `yaml:"options"`
}
RetentionConfig defines configuration for history retention.
func (*RetentionConfig) Validate ¶
func (r *RetentionConfig) Validate() error
Validate checks constraints in the supplied retention configuration and returns an error if they are violated.