Documentation ¶
Index ¶
- Constants
- func AssignByPartition[K comparable, V any, T comparable](iteratee func(key K, value V) T, maps ...map[K]V) map[T]map[K]V
- type Message
- type Properties
- func (p Properties) GetAlarmName() (string, bool)
- func (p Properties) GetClusterId() (string, bool)
- func (p Properties) GetClusterName() (string, bool)
- func (p Properties) GetDedupeKey() (string, bool)
- func (p Properties) GetDetails() map[string]string
- func (p Properties) GetFingerprint() (string, bool)
- func (p Properties) GetGoldenSignal() (string, bool)
- func (p Properties) GetGroupKey() (string, bool)
- func (p Properties) GetHeader() (string, bool)
- func (p Properties) GetSeverity() (string, bool)
- func (p Properties) GetSummary() (string, bool)
- func (p Properties) GetUuid() (string, bool)
- func (p Properties) IsPushNotification() (oneTime, found bool)
Constants ¶
View Source
const ( // Property that specifies the unique identifier for the notification // Corresponds to condition id for `AlertCondition` and an opaque identifier for // an each ephemeral `Notification` instance NotificationPropertyOpniUuid = "opni_uuid" // Any messages already in the notification queue with the same dedupe key will not be processed // immediately, but will be deduplicated. NotificationPropertyDedupeKey = "opni_dedupe_key" // Any messages with the same group key will be sent together NotificationPropertyGroupKey = "opni_group_key" // Opaque identifier for the cluster that generated the notification NotificationPropertyClusterId = "opni_clusterId" // Property that specifies how to classify the notification according to golden signal NotificationPropertyGoldenSignal = "opni_goldenSignal" // Property that specifies the severity of the notification. Severity impacts how quickly the // notification is dispatched & repeated, as well as how long to persist it. NotificationPropertySeverity = "opni_severity" // Property that is used to correlate messages to particular incidents NotificationPropertyFingerprint = "opni_fingerprint" )
Note these properties have to conform to the AlertManager label naming convention https://prometheus.io/docs/alerting/latest/configuration/#labelname
View Source
const ( // Contains the contain of the alert title NotificationContentHeader = "OpniHeader" // Contains the body of the alert message NotificationContentSummary = "OpniSummary" // Contains the friendly cluster name of the notification NotificationContentClusterName = "OpniClusterName" // Contains the friendly alarm name of the notification NotificationContentAlarmName = "OpniAlarmName" )
View Source
const ( NotificationPartitionByProperty = "properties" NotificationPartitionByDetails = "details" )
View Source
const (
// Reserved namespace for routing messages to loaded receivers
TestNamespace = "test"
)
Variables ¶
This section is empty.
Functions ¶
func AssignByPartition ¶
func AssignByPartition[K comparable, V any, T comparable](iteratee func(key K, value V) T, maps ...map[K]V) map[T]map[K]V
Types ¶
type Message ¶
type Message interface { // indicates whether this was a one time message, or a recurrent message like an alarm IsPushNotification() (oneTime, found bool) GetUuid() (uuid string, found bool) GetFingerprint() (fingerprint string, found bool) GetDedupeKey() (dedupeKey string, found bool) GetGroupKey() (groupKey string, found bool) GetGoldenSignal() (goldenSignal string, found bool) GetSeverity() (severity string, found bool) GetClusterId() (clusterId string, found bool) GetHeader() (header string, found bool) GetSummary() (summary string, found bool) GetClusterName() (clusterName string, found bool) GetAlarmName() (alarmName string, found bool) // Details GetDetails() map[string]string }
Identifies important information in message contents
type Properties ¶
func (Properties) GetAlarmName ¶
func (p Properties) GetAlarmName() (string, bool)
func (Properties) GetClusterId ¶
func (p Properties) GetClusterId() (string, bool)
func (Properties) GetClusterName ¶
func (p Properties) GetClusterName() (string, bool)
func (Properties) GetDedupeKey ¶
func (p Properties) GetDedupeKey() (string, bool)
func (Properties) GetDetails ¶
func (p Properties) GetDetails() map[string]string
func (Properties) GetFingerprint ¶
func (p Properties) GetFingerprint() (string, bool)
func (Properties) GetGoldenSignal ¶
func (p Properties) GetGoldenSignal() (string, bool)
func (Properties) GetGroupKey ¶
func (p Properties) GetGroupKey() (string, bool)
func (Properties) GetHeader ¶
func (p Properties) GetHeader() (string, bool)
func (Properties) GetSeverity ¶
func (p Properties) GetSeverity() (string, bool)
func (Properties) GetSummary ¶
func (p Properties) GetSummary() (string, bool)
func (Properties) GetUuid ¶
func (p Properties) GetUuid() (string, bool)
func (Properties) IsPushNotification ¶
func (p Properties) IsPushNotification() (oneTime, found bool)
indicates whether this was a one time message, or a recurrent message like an alarm
Click to show internal directories.
Click to hide internal directories.