Documentation
¶
Index ¶
- func EnqueueResolvedAlerts(database *db.DB, project *db.Project, alerts []*model.Alert, ...)
- type AlertNotifier
- type AlertTemplateValues
- type DeploymentTemplateValues
- type IncidentNotifier
- type IncidentTemplateValues
- type NotificationClient
- type NotificationType
- type Opsgenie
- func (og *Opsgenie) SendAlert(ctx context.Context, baseUrl string, n *db.AlertNotification) error
- func (og *Opsgenie) SendDeployment(ctx context.Context, project *db.Project, ds model.ApplicationDeploymentStatus) error
- func (og *Opsgenie) SendIncident(ctx context.Context, baseUrl string, n *db.IncidentNotification) error
- type Pagerduty
- func (pd *Pagerduty) SendAlert(ctx context.Context, baseUrl string, n *db.AlertNotification) error
- func (pd *Pagerduty) SendDeployment(ctx context.Context, project *db.Project, ds model.ApplicationDeploymentStatus) error
- func (pd *Pagerduty) SendIncident(ctx context.Context, baseUrl string, n *db.IncidentNotification) error
- type Slack
- func (s *Slack) SendAlert(ctx context.Context, baseUrl string, n *db.AlertNotification) error
- func (s *Slack) SendDeployment(ctx context.Context, project *db.Project, ds model.ApplicationDeploymentStatus) error
- func (s *Slack) SendIncident(ctx context.Context, baseUrl string, n *db.IncidentNotification) error
- type Teams
- func (t *Teams) SendAlert(ctx context.Context, baseUrl string, n *db.AlertNotification) error
- func (t *Teams) SendDeployment(ctx context.Context, project *db.Project, ds model.ApplicationDeploymentStatus) error
- func (t *Teams) SendIncident(ctx context.Context, baseUrl string, n *db.IncidentNotification) error
- type Webhook
- func (wh *Webhook) SendAlert(ctx context.Context, baseUrl string, n *db.AlertNotification) error
- func (wh *Webhook) SendDeployment(ctx context.Context, project *db.Project, ds model.ApplicationDeploymentStatus) error
- func (wh *Webhook) SendIncident(ctx context.Context, baseUrl string, n *db.IncidentNotification) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnqueueResolvedAlerts ¶ added in v1.18.0
Types ¶
type AlertNotifier ¶ added in v1.18.0
type AlertNotifier struct {
// contains filtered or unexported fields
}
func NewAlertNotifier ¶ added in v1.18.0
func NewAlertNotifier(database *db.DB) *AlertNotifier
func (*AlertNotifier) Enqueue ¶ added in v1.18.0
func (n *AlertNotifier) Enqueue(project *db.Project, app *model.Application, alert *model.Alert, rule *model.AlertingRule, now timeseries.Time)
type AlertTemplateValues ¶ added in v1.18.0
type AlertTemplateValues struct {
Status string `json:"status"`
ProjectName string `json:"project_name"`
Application model.ApplicationId `json:"application"`
RuleName string `json:"rule_name"`
Severity string `json:"severity"`
Summary string `json:"summary"`
Details []model.AlertDetail `json:"details,omitempty"`
Duration string `json:"duration,omitempty"`
ResolvedBy string `json:"resolved_by,omitempty"`
URL string `json:"url"`
}
type DeploymentTemplateValues ¶ added in v1.0.0
type IncidentNotifier ¶
type IncidentNotifier struct {
// contains filtered or unexported fields
}
func NewIncidentNotifier ¶
func NewIncidentNotifier(db *db.DB) *IncidentNotifier
func (*IncidentNotifier) Enqueue ¶
func (n *IncidentNotifier) Enqueue(project *db.Project, app *model.Application, incident *model.ApplicationIncident, now timeseries.Time)
type IncidentTemplateValues ¶ added in v1.0.0
type IncidentTemplateValues struct {
Status string `json:"status"`
Application model.ApplicationId `json:"application"`
Reports []db.IncidentNotificationDetailsReport `json:"reports"`
URL string `json:"url"`
}
type NotificationClient ¶
type NotificationClient interface {
SendIncident(ctx context.Context, baseUrl string, n *db.IncidentNotification) error
SendDeployment(ctx context.Context, project *db.Project, ds model.ApplicationDeploymentStatus) error
SendAlert(ctx context.Context, baseUrl string, n *db.AlertNotification) error
}
type NotificationType ¶ added in v1.18.0
type NotificationType int
const ( NotificationTypeIncident NotificationType = iota NotificationTypeAlert )
type Opsgenie ¶
type Opsgenie struct {
// contains filtered or unexported fields
}
func NewOpsgenie ¶
func (*Opsgenie) SendDeployment ¶ added in v1.10.0
func (*Opsgenie) SendIncident ¶
type Pagerduty ¶
type Pagerduty struct {
// contains filtered or unexported fields
}
func NewPagerduty ¶
func (*Pagerduty) SendDeployment ¶ added in v1.10.0
func (*Pagerduty) SendIncident ¶
type Slack ¶
type Slack struct {
// contains filtered or unexported fields
}
func (*Slack) SendDeployment ¶
func (*Slack) SendIncident ¶
type Teams ¶
type Teams struct {
// contains filtered or unexported fields
}
func (*Teams) SendDeployment ¶
func (*Teams) SendIncident ¶
type Webhook ¶ added in v1.0.0
type Webhook struct {
// contains filtered or unexported fields
}
func NewWebhook ¶ added in v1.0.0
func NewWebhook(cfg *db.IntegrationWebhook) *Webhook
func (*Webhook) SendDeployment ¶ added in v1.0.0
func (*Webhook) SendIncident ¶ added in v1.0.0
Click to show internal directories.
Click to hide internal directories.