Documentation ¶
Index ¶
- type AlertingConfig
- type AlertingConfigFile
- type AlertmanagerConfig
- type AlertmanagerConfigs
- type ChartOptions
- type Config
- type Dashboard
- type Datasource
- type DatasourceConfig
- type DatasourceSelector
- type DatasourceSystem
- type DatasourceType
- type Discovery
- type EtcUser
- type GlobalConfig
- type Panel
- type Row
- type Rule
- type RuleFile
- type RuleGroup
- type Target
- type TargetGroup
- type Threshold
- type User
- type UserConfig
- type VentiVersion
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlertingConfig ¶ added in v0.2.8
type AlertingConfig struct { EvaluationInterval time.Duration `yaml:"evaluation_interval,omitempty"` AlertRelabelConfigs []*relabel.Config `yaml:"alert_relabel_configs,omitempty"` AlertmanagerConfigs AlertmanagerConfigs `yaml:"alertmanagers,omitempty"` GlobalLabels map[string]string `yaml:"globalLabels,omitempty"` }
type AlertingConfigFile ¶ added in v0.2.8
type AlertingConfigFile struct {
AlertingConfig AlertingConfig `yaml:"alerting,omitempty"`
}
type AlertmanagerConfig ¶ added in v0.2.8
type AlertmanagerConfig struct {
StaticConfig []*TargetGroup `yaml:"static_configs,omitempty"`
}
type AlertmanagerConfigs ¶ added in v0.2.8
type AlertmanagerConfigs []*AlertmanagerConfig
AlertmanagerConfigs is a slice of *AlertmanagerConfig.
type ChartOptions ¶
type ChartOptions struct {
YMax int `json:"yMax,omitempty" yaml:"yMax,omitempty"`
}
type Config ¶
type Config struct { Version string GlobalConfig GlobalConfig DatasourceConfig DatasourceConfig UserConfig UserConfig AlertingConfig AlertingConfig }
type Datasource ¶
type Datasource struct { Type DatasourceType `json:"type" yaml:"type"` Name string `json:"name" yaml:"name"` URL string `json:"url" yaml:"url"` BasicAuth bool `json:"basicAuth" yaml:"basicAuth"` BasicAuthUser string `json:"basicAuthUser" yaml:"basicAuthUser"` BasicAuthPassword string `json:"basicAuthPassword" yaml:"basicAuthPassword"` IsMain bool `json:"isMain,omitempty" yaml:"isMain,omitempty"` IsDiscovered bool `json:"isDiscovered,omitempty" yaml:"isDiscovered,omitempty"` }
type DatasourceConfig ¶
type DatasourceConfig struct { QueryTimeout time.Duration `json:"queryTimeout,omitempty" yaml:"queryTimeout,omitempty"` Datasources []Datasource `json:"datasources" yaml:"datasources,omitempty"` Discovery Discovery `json:"discovery,omitempty" yaml:"discovery,omitempty"` }
type DatasourceSelector ¶
type DatasourceSelector struct { System DatasourceSystem `json:"system" yaml:"system"` Type DatasourceType `json:"type" yaml:"type"` }
type DatasourceSystem ¶
type DatasourceSystem string
const ( DatasourceSystemNone DatasourceSystem = "" DatasourceSystemMain DatasourceSystem = "main" DatasourceSystemSub DatasourceSystem = "sub" )
type DatasourceType ¶
type DatasourceType string
const ( DatasourceTypeNone DatasourceType = "" DatasourceTypePrometheus DatasourceType = "prometheus" DatasourceTypeLethe DatasourceType = "lethe" )
type Discovery ¶
type Discovery struct { Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` // default: false MainNamespace string `json:"mainNamespace,omitempty" yaml:"mainNamespace,omitempty"` // default: ” AnnotationKey string `json:"annotationKey,omitempty" yaml:"annotationKey,omitempty"` // default: kuoss.org/datasource-type ByNamePrometheus bool `json:"byNamePrometheus,omitempty" yaml:"byNamePrometheus,omitempty"` // deprecated ByNameLethe bool `json:"byNameLethe,omitempty" yaml:"byNameLethe,omitempty"` // deprecated }
type GlobalConfig ¶ added in v0.2.8
type Panel ¶
type Panel struct { Title string `json:"title" yaml:"title"` Type string `json:"type" yaml:"type"` Headers []string `json:"headers,omitempty" yaml:"headers,omitempty"` Targets []Target `json:"targets" yaml:"targets"` ChartOptions *ChartOptions `json:"chartOptions,omitempty" yaml:"chartOptions,omitempty"` }
type Rule ¶
type Rule struct { Record string `json:"record,omitempty" yaml:"record,omitempty"` Alert string `json:"alert,omitempty" yaml:"alert,omitempty"` Expr string `json:"expr" yaml:"expr"` For time.Duration `json:"for" yaml:"for,omitempty"` KeepFiringFor time.Duration `json:"keep_firing_for,omitempty" yaml:"keep_firing_for,omitempty"` Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` }
type RuleFile ¶
type RuleFile struct { Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` CommonLabels map[string]string `json:"commonLabels,omitempty" yaml:"commonLabels,omitempty"` DatasourceSelector DatasourceSelector `json:"datasourceSelector" yaml:"datasourceSelector"` RuleGroups []RuleGroup `json:"groups" yaml:"groups"` }
type RuleGroup ¶
type RuleGroup struct { Name string `json:"name" yaml:"name"` Interval time.Duration `json:"interval,omitempty" yaml:"interval,omitempty"` Limit int `json:"limit,omitempty" yaml:"limit,omitempty"` Rules []Rule `json:"rules" yaml:"rules"` }
https://github.com/prometheus/prometheus/blob/v2.43.0/model/rulefmt/rulefmt.go#L137
type Target ¶
type Target struct { Expr string `json:"expr"` Legend string `json:"legend,omitempty" yaml:"legend,omitempty"` Legends []string `json:"legends,omitempty" yaml:"legends,omitempty"` Unit string `json:"unit,omitempty" yaml:"unit,omitempty"` Columns []string `json:"columns,omitempty" yaml:"columns,omitempty"` Headers []string `json:"headers,omitempty" yaml:"headers,omitempty"` Key string `json:"key,omitempty" yaml:"key,omitempty"` Thresholds []Threshold `json:"thresholds,omitempty" yaml:"thresholds,omitempty"` Aggregation string `json:"aggregation,omitempty" yaml:"aggregation,omitempty"` }
TODO: what Legend, Legends is for?
type TargetGroup ¶ added in v0.2.8
type TargetGroup struct { Targets []string `yaml:"targets"` Labels commonModel.LabelSet `yaml:"labels,omitempty"` }
type UserConfig ¶
type UserConfig struct {
EtcUsers []EtcUser `yaml:"users"`
}
type VentiVersion ¶
Click to show internal directories.
Click to hide internal directories.