Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultSeverity = "critical" DefaultClass = "default" DefaultGroup = "default" DefaultClient = "Grafana" DefaultURL = "https://events.pagerduty.com/v2/enqueue" )
View Source
const FullValidConfigForTesting = `` /* 294-byte string literal not displayed */
FullValidConfigForTesting is a string representation of a JSON object that contains all fields supported by the notifier Config. It can be used without secrets.
View Source
const FullValidSecretsForTesting = `{
"integrationKey": "test-secret-api-key"
}`
FullValidSecretsForTesting is a string representation of JSON object that contains all fields that can be overridden from secrets
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Key string `json:"integrationKey,omitempty" yaml:"integrationKey,omitempty"` Severity string `json:"severity,omitempty" yaml:"severity,omitempty"` Details map[string]string `json:"details,omitempty" yaml:"details,omitempty"` Class string `json:"class,omitempty" yaml:"class,omitempty"` Component string `json:"component,omitempty" yaml:"component,omitempty"` Group string `json:"group,omitempty" yaml:"group,omitempty"` Summary string `json:"summary,omitempty" yaml:"summary,omitempty"` Source string `json:"source,omitempty" yaml:"source,omitempty"` Client string `json:"client,omitempty" yaml:"client,omitempty"` ClientURL string `json:"client_url,omitempty" yaml:"client_url,omitempty"` URL string `json:"url,omitempty" yaml:"url,omitempty"` }
func NewConfig ¶
func NewConfig(jsonData json.RawMessage, decryptFn receivers.DecryptFunc) (Config, error)
type Notifier ¶
Notifier is responsible for sending alert notifications to pagerduty
func New ¶
func New(cfg Config, meta receivers.Metadata, template *templates.Template, sender receivers.WebhookSender, images images.Provider, logger logging.Logger) *Notifier
New is the constructor for the PagerDuty notifier
func (*Notifier) SendResolved ¶
Click to show internal directories.
Click to hide internal directories.