Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IncidentioConfig ¶ added in v0.33.0
type IncidentioConfig struct {
amcommoncfg.NotifierConfig `yaml:",inline" json:",inline"`
HTTPConfig *commoncfg.HTTPClientConfig `yaml:"http_config,omitempty" json:"http_config,omitempty"`
// URL to send POST request to.
URL *amcommoncfg.URL `yaml:"url" json:"url"`
URLFile string `yaml:"url_file" json:"url_file"`
// AlertSourceToken is the key used to authenticate with the alert source in incident.io.
AlertSourceToken commoncfg.Secret `yaml:"alert_source_token,omitempty" json:"alert_source_token,omitempty"`
AlertSourceTokenFile string `yaml:"alert_source_token_file,omitempty" json:"alert_source_token_file,omitempty"`
// MaxAlerts is the maximum number of alerts to be sent per incident.io message.
// Alerts exceeding this threshold will be truncated. Setting this to 0
// allows an unlimited number of alerts. Note that if the payload exceeds
// incident.io's size limits, you will receive a 429 response and alerts
// will not be ingested.
MaxAlerts uint64 `yaml:"max_alerts" json:"max_alerts"`
// Timeout is the maximum time allowed to invoke incident.io. Setting this to 0
// does not impose a timeout.
Timeout time.Duration `yaml:"timeout" json:"timeout"`
}
IncidentioConfig configures notifications via incident.io.
func (*IncidentioConfig) UnmarshalYAML ¶ added in v0.33.0
func (c *IncidentioConfig) UnmarshalYAML(unmarshal func(any) error) error
UnmarshalYAML implements the yaml.Unmarshaler interface.
type Message ¶
type Message struct {
*template.Data
// The protocol version.
Version string `json:"version"`
GroupKey string `json:"groupKey"`
TruncatedAlerts uint64 `json:"truncatedAlerts"`
}
Message defines the JSON object sent to incident.io endpoints.
type Notifier ¶
type Notifier struct {
// contains filtered or unexported fields
}
Notifier implements a Notifier for incident.io.
Click to show internal directories.
Click to hide internal directories.