Documentation
¶
Index ¶
- Constants
- type AlertManager
- func (a *AlertManager) Close() error
- func (a *AlertManager) PrepareAndSendEvent(alertPayload *AlertPayload) error
- func (a *AlertManager) SendExternalTableEvent(attr *resource.ETAlertAttrs)
- func (a *AlertManager) SendJobEvent(attr *job.AlertAttrs)
- func (a *AlertManager) SendJobRunEvent(e *scheduler.AlertAttrs)
- func (a *AlertManager) SendOperatorSLAEvent(attr *scheduler.OperatorSLAAlertAttrs)
- func (a *AlertManager) SendPotentialSLABreach(attr *scheduler.PotentialSLABreachAttrs)
- func (a *AlertManager) SendReplayEvent(attr *scheduler.ReplayNotificationAttrs)
- func (a *AlertManager) SendResourceEvent(attr *resource.AlertAttrs)
- type AlertPayload
- type AlertStatus
- type AlertsRepo
- type ReplayEventType
Constants ¶
View Source
const ( InfoSeverity = "INFO" WarningSeverity = "WARNING" CriticalSeverity = "CRITICAL" DefaultSeverity = WarningSeverity DefaultChannelLabel = "team" SeverityLabel = "severity" EnvironmentLabel = "environment" )
View Source
const ( MetricNotificationQueue = "notification_received_total" MetricNotificationWorkerSendErr = "notification_err_total" MetricNotificationSend = "notification_sent_successfully" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlertManager ¶
func New ¶
func New(ctx context.Context, logger log.Logger, host, endpoint, dashboard, dataConsole string, alertsRepo AlertsRepo) *AlertManager
func (*AlertManager) Close ¶
func (a *AlertManager) Close() error
func (*AlertManager) PrepareAndSendEvent ¶ added in v0.16.2
func (a *AlertManager) PrepareAndSendEvent(alertPayload *AlertPayload) error
func (*AlertManager) SendExternalTableEvent ¶ added in v0.19.0
func (a *AlertManager) SendExternalTableEvent(attr *resource.ETAlertAttrs)
func (*AlertManager) SendJobEvent ¶ added in v0.16.2
func (a *AlertManager) SendJobEvent(attr *job.AlertAttrs)
func (*AlertManager) SendJobRunEvent ¶ added in v0.16.2
func (a *AlertManager) SendJobRunEvent(e *scheduler.AlertAttrs)
func (*AlertManager) SendOperatorSLAEvent ¶ added in v0.22.0
func (a *AlertManager) SendOperatorSLAEvent(attr *scheduler.OperatorSLAAlertAttrs)
func (*AlertManager) SendPotentialSLABreach ¶ added in v0.22.4
func (a *AlertManager) SendPotentialSLABreach(attr *scheduler.PotentialSLABreachAttrs)
func (*AlertManager) SendReplayEvent ¶ added in v0.16.2
func (a *AlertManager) SendReplayEvent(attr *scheduler.ReplayNotificationAttrs)
func (*AlertManager) SendResourceEvent ¶ added in v0.16.2
func (a *AlertManager) SendResourceEvent(attr *resource.AlertAttrs)
type AlertPayload ¶
type AlertPayload struct {
Project string `json:"-"`
LogTag string `json:"-"`
Data map[string]interface{} `json:"data"`
Template string `json:"template"`
Labels map[string]string `json:"labels"`
Endpoint string `json:"-"`
}
func (*AlertPayload) HasDefaultChannelLabel ¶ added in v0.22.4
func (a *AlertPayload) HasDefaultChannelLabel() bool
type AlertStatus ¶ added in v0.22.4
type AlertStatus string
const ( StatusPending AlertStatus = "PENDING" StatusSent AlertStatus = "SENT" StatusFailed AlertStatus = "FAILED" )
type AlertsRepo ¶ added in v0.22.4
type ReplayEventType ¶ added in v0.17.0
type ReplayEventType string
func (ReplayEventType) String ¶ added in v0.17.0
func (j ReplayEventType) String() string
Click to show internal directories.
Click to hide internal directories.