opsgenie

package
v0.13.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package opsgenie implements Opsgenie notifications for Cloudprober alert events.

Index

Constants

View Source
const (
	// DefaultOpsgenieAPIURL is the base URL for the Opsgenie API.
	DefaultOpsgenieAPIURL = "https://api.opsgenie.com/v2/alerts"

	// DEFAULT_opsgenie_ROUTING_KEY_ENV_VAR is the default environment variable
	// to use for the Opsgenie routing key.
	DefaultApiKeyEnvVar = "OPSGENIE_API_KEY"
)
View Source
const (
	P1, P2, P3, P4 priority = "P1", "P2", "P3", "P4"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(cfg *configpb.Opsgenie, l *logger.Logger) (*Client, error)

func (*Client) Notify

func (c *Client) Notify(ctx context.Context, alertInfo *alertinfo.AlertInfo, alertFields map[string]string) error

func (*Client) NotifyResolve

func (c *Client) NotifyResolve(ctx context.Context, alertInfo *alertinfo.AlertInfo, alertFields map[string]string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL