sumologic

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MonitorKindBurnRate    = "BurnRate"
	MonitorKindSLI         = "SLI"
	ComplianceTypeCalendar = "Calendar"
	ComplianceTypeRolling  = "Rolling"
)
View Source
const (
	AnnotationMonitorFolderID           = "sumologic/monitor-folder-id"
	AnnotationSLOFolderID               = "sumologic/slo-folder-id"
	AnnotationTFResourceName            = "sumologic/tf-resource-name"
	AnnotationSignalType                = "sumologic/signal-type"
	AnnotationEmailRecipients           = "recipients"
	AnnotationEmailSubject              = "subject"
	AnnotationEmailBody                 = "message_body"
	AnnotationEmailTimeZone             = "timezone"
	AnnotationRunForTriggers            = "run_for_triggers"
	AnnotationConnectionID              = "connection_id"
	AnnotationConnectionType            = "connection_type"
	AnnotationPayloadOverride           = "payload_override"
	AnnotationResolutionPayloadOverride = "resolution_payload_override"
	AlertConditionTypeBurnRate          = "burnrate"
	AlertConditionTypeSLI               = "sli"
)
View Source
const (
	SourceTypeLogs    = "sumologic-logs"
	SourceTypeMetrics = "sumologic-metrics"
)
View Source
const (
	SLOTmplName        = "slo.tf.gotf"
	SLOFolderTmplName  = "slo-folders.tf.gotf"
	SLOMonitorTmplName = "slo-monitors.tf.gotf"
)

Variables

This section is empty.

Functions

func FillBurnRateAlert

func FillBurnRateAlert(c oslo.AlertConditionSpec, m *SLOMonitor) error

func FillSLIAlert

func FillSLIAlert(c oslo.AlertConditionSpec, m *SLOMonitor) error

func GenSLOMonitorsFromAPNames

func GenSLOMonitorsFromAPNames(apMap map[string]oslo.AlertPolicy, ntMap map[string]oslo.AlertNotificationTarget,
	sumoSLO *SLO, slo oslo.SLO) (string, error)

func GiveMonitorTerraform

func GiveMonitorTerraform(mons []SLOMonitor) (string, error)

func GiveSLOMonitorTerraform added in v1.0.2

func GiveSLOMonitorTerraform(apMap map[string]oslo.AlertPolicy, ntMap map[string]oslo.AlertNotificationTarget,
	slo specs.OpenSLOSpec) (string, error)

func GiveSLOTerraform

func GiveSLOTerraform(s specs.OpenSLOSpec) (string, error)

func GiveTerraform added in v1.0.2

func GiveTerraform(apMap map[string]oslo.AlertPolicy, ntMap map[string]oslo.AlertNotificationTarget,
	slo specs.OpenSLOSpec) (string, string, error)

func IsSource added in v1.0.2

func IsSource(slo specs.OpenSLOSpec) bool

Types

type NotifyConnection

type NotifyConnection struct {
	ID                        string
	Type                      string
	RunForTriggers            []string
	PayloadOverride           string
	ResolutionPayloadOverride string
}

type NotifyEmail

type NotifyEmail struct {
	Recipients     []string
	Subject        string
	Body           string
	TimeZone       string
	RunForTriggers []string
}

type SLO

type SLO struct {
	*sumotf.SLOLibrarySLO
}

func ConvertToSumoSLO

func ConvertToSumoSLO(slo specs.OpenSLOSpec) (*SLO, error)

func (SLO) TFResourceName

func (s SLO) TFResourceName() string

type SLOFolder

type SLOFolder struct {
	*sumotf.SLOLibraryFolder
}

type SLOMonitor

type SLOMonitor struct {
	Service                   string
	SLOName                   string
	FolderID                  string
	SloID                     string
	ParentID                  string
	MonitorName               string
	EvaluationDelay           string
	TriggerType               string
	SliThresholdWarning       float64
	SliThresholdCritical      float64
	TimeRangeWarning          string
	TimeRangeCritical         string
	BurnRateThresholdWarning  float64
	BurnRateThresholdCritical float64
	NotifyEmails              []NotifyEmail
	NotifyConnections         []NotifyConnection
}

func ConvertToSumoMonitor

func ConvertToSumoMonitor(ap oslo.AlertPolicy, slo *SLO, notifyMap map[string]oslo.AlertNotificationTarget) ([]SLOMonitor, error)

func MergeMonitors

func MergeMonitors(mons []SLOMonitor) []SLOMonitor

MergeMonitors merges multiple OpenSLO monitors critical & warning into one sumo monitor based on the name of the monitor.

func (SLOMonitor) TFResourceName

func (s SLOMonitor) TFResourceName() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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