config

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertConfig

type AlertConfig struct {
	Groups []Group `yaml:"groups"`
}

func ReadAlertConfig

func ReadAlertConfig(filename string) (*AlertConfig, error)

type Alertmanager

type Alertmanager struct {
	Scheme       string       `yaml:"scheme"`
	StaticConfig StaticConfig `yaml:"static_config"`
}

type Clickhouse

type Clickhouse struct {
	Addresses []string `yaml:"addresses"`
	Database  string   `yaml:"database"`
	Username  string   `yaml:"username"`
	Password  string   `yaml:"password"`
	TLS       bool     `yaml:"tls"`
}

type Config

type Config struct {
	Clickhouse         Clickhouse   `yaml:"clickhouse"`
	Alertmanager       Alertmanager `yaml:"alertmanager"`
	RuleFiles          []string     `yaml:"rule_files"`
	EvaluationInterval int          `yaml:"evaluation_interval"`
}

func ReadConfig

func ReadConfig(filename string) (*Config, error)

type Group

type Group struct {
	Name   string            `yaml:"name"`
	Labels map[string]string `yaml:"labels"`
	Rules  []Rule            `yaml:"rules"`
}

type Rule

type Rule struct {
	AlertName   string            `yaml:"alert"`
	Expr        string            `yaml:"expr"`
	Labels      map[string]string `yaml:"labels"`
	Annotations map[string]string `yaml:"annotations"`
}

type StaticConfig

type StaticConfig struct {
	Targets []string `yaml:"targets"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL