Documentation
ΒΆ
Index ΒΆ
- Constants
- func NewAlertCondition(name string, severity AlertSeverity, threshold float64, ...) v1.AlertCondition
- func NewAlertNotificationTarget(name, target, description string) v1.AlertNotificationTarget
- func ReadJSONFile(filename string) ([]openslo.Object, error)
- func ReadYAMLFile(filename string) ([]openslo.Object, error)
- func StandardBurnRateAlerts() []v1.AlertCondition
- func WriteJSONFile(filename string, objects ...openslo.Object) error
- func WriteYAMLFile(filename string, objects ...openslo.Object) error
- type AlertPolicyBuilder
- func (b *AlertPolicyBuilder) AddConditionInline(name string, severity AlertSeverity, threshold float64, lookbackWindow string) *AlertPolicyBuilder
- func (b *AlertPolicyBuilder) AddConditionRef(ref string) *AlertPolicyBuilder
- func (b *AlertPolicyBuilder) AddNotificationTargetInline(name, target, description string) *AlertPolicyBuilder
- func (b *AlertPolicyBuilder) AddNotificationTargetRef(ref string) *AlertPolicyBuilder
- func (b *AlertPolicyBuilder) AlertWhenBreaching(v bool) *AlertPolicyBuilder
- func (b *AlertPolicyBuilder) AlertWhenNoData(v bool) *AlertPolicyBuilder
- func (b *AlertPolicyBuilder) AlertWhenResolved(v bool) *AlertPolicyBuilder
- func (b *AlertPolicyBuilder) Build() v1.AlertPolicy
- func (b *AlertPolicyBuilder) WithDescription(desc string) *AlertPolicyBuilder
- func (b *AlertPolicyBuilder) WithLabels(labels v1.Labels) *AlertPolicyBuilder
- type AlertSeverity
- type Objects
- func (objs *Objects) AddAlertConditions(conditions ...v1.AlertCondition)
- func (objs *Objects) AddAlertNotificationTargets(targets ...v1.AlertNotificationTarget)
- func (objs *Objects) AddAlertPolicies(policies ...v1.AlertPolicy)
- func (objs *Objects) AddSLOs(slos ...v1.SLO)
- func (objs Objects) Validate() error
- func (objs Objects) WriteFile(filename string, format openslosdk.ObjectFormat) error
- func (objs Objects) WriteFileJSON(filename string) error
- func (objs Objects) WriteFileYAML(filename string) error
Constants ΒΆ
const (
AttrQuery = "query"
)
Variables ΒΆ
This section is empty.
Functions ΒΆ
func NewAlertCondition ΒΆ added in v0.3.0
func NewAlertCondition(name string, severity AlertSeverity, threshold float64, lookbackWindow, alertAfter string) v1.AlertCondition
NewAlertCondition creates a new AlertCondition with burn rate configuration. lookbackWindow and alertAfter are duration strings like "1h", "5m", "1d".
func NewAlertNotificationTarget ΒΆ added in v0.3.0
func NewAlertNotificationTarget(name, target, description string) v1.AlertNotificationTarget
NewAlertNotificationTarget creates a new AlertNotificationTarget.
func ReadJSONFile ΒΆ added in v0.3.0
ReadJSONFile reads multiple OpenSLO objects from a JSON file. The JSON file should contain an array of objects.
func ReadYAMLFile ΒΆ added in v0.3.0
ReadYAMLFile reads multiple OpenSLO objects from a YAML file. The YAML file can contain multiple objects separated by '---'.
func StandardBurnRateAlerts ΒΆ added in v0.3.0
func StandardBurnRateAlerts() []v1.AlertCondition
StandardBurnRateAlerts returns standard multi-window burn rate alert conditions. This implements the Google SRE recommended approach with fast and slow burn rates.
Fast burn (14x): 1h lookback, alerts quickly for severe issues Slow burn (1x): 6h lookback, catches gradual degradation
func WriteJSONFile ΒΆ added in v0.3.0
WriteJSONFile writes multiple OpenSLO objects to a JSON file. Objects will be written as a JSON array.
Types ΒΆ
type AlertPolicyBuilder ΒΆ added in v0.3.0
type AlertPolicyBuilder struct {
// contains filtered or unexported fields
}
AlertPolicyBuilder provides a fluent interface for building AlertPolicy objects.
func NewAlertPolicyBuilder ΒΆ added in v0.3.0
func NewAlertPolicyBuilder(name string) *AlertPolicyBuilder
NewAlertPolicyBuilder creates a new AlertPolicyBuilder.
func (*AlertPolicyBuilder) AddConditionInline ΒΆ added in v0.3.0
func (b *AlertPolicyBuilder) AddConditionInline(name string, severity AlertSeverity, threshold float64, lookbackWindow string) *AlertPolicyBuilder
AddConditionInline adds an inline AlertCondition. lookbackWindow is a duration string like "1h", "5m", "1d".
func (*AlertPolicyBuilder) AddConditionRef ΒΆ added in v0.3.0
func (b *AlertPolicyBuilder) AddConditionRef(ref string) *AlertPolicyBuilder
AddConditionRef adds a reference to an external AlertCondition.
func (*AlertPolicyBuilder) AddNotificationTargetInline ΒΆ added in v0.3.0
func (b *AlertPolicyBuilder) AddNotificationTargetInline(name, target, description string) *AlertPolicyBuilder
AddNotificationTargetInline adds an inline AlertNotificationTarget.
func (*AlertPolicyBuilder) AddNotificationTargetRef ΒΆ added in v0.3.0
func (b *AlertPolicyBuilder) AddNotificationTargetRef(ref string) *AlertPolicyBuilder
AddNotificationTargetRef adds a reference to an external AlertNotificationTarget.
func (*AlertPolicyBuilder) AlertWhenBreaching ΒΆ added in v0.3.0
func (b *AlertPolicyBuilder) AlertWhenBreaching(v bool) *AlertPolicyBuilder
AlertWhenBreaching configures alerting when SLO is breaching.
func (*AlertPolicyBuilder) AlertWhenNoData ΒΆ added in v0.3.0
func (b *AlertPolicyBuilder) AlertWhenNoData(v bool) *AlertPolicyBuilder
AlertWhenNoData configures alerting when no data is available.
func (*AlertPolicyBuilder) AlertWhenResolved ΒΆ added in v0.3.0
func (b *AlertPolicyBuilder) AlertWhenResolved(v bool) *AlertPolicyBuilder
AlertWhenResolved configures alerting when SLO breach is resolved.
func (*AlertPolicyBuilder) Build ΒΆ added in v0.3.0
func (b *AlertPolicyBuilder) Build() v1.AlertPolicy
Build creates the AlertPolicy.
func (*AlertPolicyBuilder) WithDescription ΒΆ added in v0.3.0
func (b *AlertPolicyBuilder) WithDescription(desc string) *AlertPolicyBuilder
WithDescription sets the alert policy description.
func (*AlertPolicyBuilder) WithLabels ΒΆ added in v0.3.0
func (b *AlertPolicyBuilder) WithLabels(labels v1.Labels) *AlertPolicyBuilder
WithLabels sets the alert policy labels.
type AlertSeverity ΒΆ added in v0.3.0
type AlertSeverity string
AlertSeverity represents standard alert severity levels.
const ( SeverityCritical AlertSeverity = "critical" SeverityHigh AlertSeverity = "high" SeverityMedium AlertSeverity = "medium" SeverityLow AlertSeverity = "low" SeverityInfo AlertSeverity = "info" )
type Objects ΒΆ
func (*Objects) AddAlertConditions ΒΆ added in v0.3.0
func (objs *Objects) AddAlertConditions(conditions ...v1.AlertCondition)
AddAlertConditions adds AlertCondition objects to the Objects slice.
func (*Objects) AddAlertNotificationTargets ΒΆ added in v0.3.0
func (objs *Objects) AddAlertNotificationTargets(targets ...v1.AlertNotificationTarget)
AddAlertNotificationTargets adds AlertNotificationTarget objects to the Objects slice.
func (*Objects) AddAlertPolicies ΒΆ added in v0.3.0
func (objs *Objects) AddAlertPolicies(policies ...v1.AlertPolicy)
AddAlertPolicies adds AlertPolicy objects to the Objects slice.
func (Objects) WriteFile ΒΆ
func (objs Objects) WriteFile(filename string, format openslosdk.ObjectFormat) error
func (Objects) WriteFileJSON ΒΆ
func (Objects) WriteFileYAML ΒΆ
Directories
ΒΆ
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
gen-examples-json-yaml
command
|
|
|
gen-metrics-doc
command
|
|
|
label-stats
command
|
|
|
ontologies
|
|
|
domains/business
Package business provides business-specific ontology labels and values for SLOs.
|
Package business provides business-specific ontology labels and values for SLOs. |
|
domains/compliance
Package compliance provides compliance-specific ontology labels and values for SLOs.
|
Package compliance provides compliance-specific ontology labels and values for SLOs. |
|
domains/iam
Package iam provides IAM/IGA-specific ontology labels and values for SLOs.
|
Package iam provides IAM/IGA-specific ontology labels and values for SLOs. |
|
domains/operations
Package operations provides operations-specific ontology labels and values for SLOs.
|
Package operations provides operations-specific ontology labels and values for SLOs. |
|
domains/product
Package product provides product/growth-specific ontology labels and values for SLOs.
|
Package product provides product/growth-specific ontology labels and values for SLOs. |
|
domains/saas
Package saas provides SaaS-specific ontology labels and values for SLOs.
|
Package saas provides SaaS-specific ontology labels and values for SLOs. |
|
domains/security
Package security provides security-specific ontology labels and values for SLOs.
|
Package security provides security-specific ontology labels and values for SLOs. |
|
Package ontology provides a generic labeling taxonomy for SLOs.
|
Package ontology provides a generic labeling taxonomy for SLOs. |