Documentation ¶
Index ¶
- Constants
- func GenerateNonSLAPromRules[T client.Object](alerts Alerts) func(ctx context.Context, obj T, svc *runtime.ServiceRuntime) *fnproto.Result
- type AlertBuilder
- func (a *AlertBuilder) AddAll() *AlertBuilder
- func (a *AlertBuilder) AddCustom(r []promV1.Rule) *AlertBuilder
- func (a *AlertBuilder) AddCustomServiceRule(name string, rule ServiceRule) *AlertBuilder
- func (a *AlertBuilder) AddDisk() *AlertBuilder
- func (a *AlertBuilder) AddDiskFillingUp() *AlertBuilder
- func (a *AlertBuilder) AddMemory() *AlertBuilder
- func (a *AlertBuilder) GetAlerts() Alerts
- type Alerts
- type ServiceRule
Constants ¶
View Source
const ( SynTeam string = "schedar" SeverityCritical string = "critical" MinuteInterval, HourInterval, TwoHourInterval promV1.Duration = "1m", "1h", "2h" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AlertBuilder ¶
type AlertBuilder struct {
// contains filtered or unexported fields
}
func NewAlertSetBuilder ¶
func NewAlertSetBuilder(containerName string) *AlertBuilder
func (*AlertBuilder) AddAll ¶
func (a *AlertBuilder) AddAll() *AlertBuilder
func (*AlertBuilder) AddCustom ¶
func (a *AlertBuilder) AddCustom(r []promV1.Rule) *AlertBuilder
func (*AlertBuilder) AddCustomServiceRule ¶ added in v4.104.1
func (a *AlertBuilder) AddCustomServiceRule(name string, rule ServiceRule) *AlertBuilder
func (*AlertBuilder) AddDisk ¶
func (a *AlertBuilder) AddDisk() *AlertBuilder
func (*AlertBuilder) AddDiskFillingUp ¶
func (a *AlertBuilder) AddDiskFillingUp() *AlertBuilder
func (*AlertBuilder) AddMemory ¶
func (a *AlertBuilder) AddMemory() *AlertBuilder
func (*AlertBuilder) GetAlerts ¶
func (a *AlertBuilder) GetAlerts() Alerts
type Alerts ¶
type Alerts struct {
// contains filtered or unexported fields
}
Alerts the object that the service must create to generate non sla prometheus rules
type ServiceRule ¶
ServiceRule is a func definition to get a specific rule based on a container name s and namespace name n
Click to show internal directories.
Click to hide internal directories.