Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommonEventToSignature ¶ added in v0.3.1
func CommonEventToSignature(payload PagerDutyPayload) uint64
CommonEventToSignature returns a signature for a given common event.
Types ¶
type PagerDutyEventer ¶
type PagerDutyEventer interface { // Handler handles http requests. Handler(http.ResponseWriter, *http.Request) }
PagerDutyEventer can handle valid pagerduty events.
func NewPagerDutyEventer ¶
func NewPagerDutyEventer( ctx context.Context, logger logr.Logger, cli client.Client, cache cache.Cache, sinkEventToKafka bool, kafkaAddress string, sinkEventToWebhookReceiver bool, webhookAddress string, pagerdutyEventerEnabled bool, ) PagerDutyEventer
NewPagerDutyEventer creates a new PagerDutyEventer.
type PagerDutyImage ¶
type PagerDutyLink ¶
type PagerDutyMessage ¶
type PagerDutyMessage struct { RoutingKey string `json:"routing_key,omitempty"` ServiceKey string `json:"service_key,omitempty"` DedupKey string `json:"dedup_key,omitempty"` IncidentKey string `json:"incident_key,omitempty"` EventType string `json:"event_type,omitempty"` Description string `json:"description,omitempty"` EventAction string `json:"event_action"` Payload *PagerDutyPayload `json:"payload"` Client string `json:"client,omitempty"` ClientURL string `json:"client_url,omitempty"` Details map[string]string `json:"details,omitempty"` Images []PagerDutyImage `json:"images,omitempty"` Links []PagerDutyLink `json:"links,omitempty"` }
PagerDutyMessage contains a message with the payload in PD-CEF. See more details at https://support.pagerduty.com/docs/pd-cef. This code block refers to https://github.com/prometheus/alertmanager/blob/v0.24.0/notify/pagerduty/pagerduty.go#L75.
type PagerDutyPayload ¶
type PagerDutyPayload struct { Summary string `json:"summary"` Source string `json:"source"` Severity string `json:"severity"` Timestamp string `json:"timestamp,omitempty"` Class string `json:"class,omitempty"` Component string `json:"component,omitempty"` Group string `json:"group,omitempty"` CustomDetails map[string]string `json:"custom_details,omitempty"` }
PagerDutyPayload contains the details of each PD-CEF field. See more details at https://support.pagerduty.com/docs/pd-cef.
Click to show internal directories.
Click to hide internal directories.