Documentation
¶
Overview ¶
Copyright 2024 CloudDetail SPDX-License-Identifier: Apache-2.0
Index ¶
- Variables
- func Decode(sourceFrom ainput.SourceFrom, data []byte) ([]ainput.AlertEvent, error)
- func DecodeEvent(input map[string]interface{}, result interface{}) error
- func ToTimeHookFunc() mapstructure.DecodeHookFunc
- type Agent
- type Client
- type DatadogDecoder
- type DatadogPayload
- type Decoder
- type ErrDecoderNotFound
- type JsonDecoder
- type PagerDutyDecoder
- type PagerDutyEvent
- type PrometheusDecoder
- type ZabbixDecoder
Constants ¶
This section is empty.
Variables ¶
View Source
var DDPriorityMap = map[string]string{ "P1": alert.SeverityCriticalLevel, "P2": alert.SeverityErrorLevel, "P3": alert.SeverityWarnLevel, "P4": alert.SeverityInfoLevel, }
View Source
var PagerDutyPriorityMap = map[string]string{ "P1": alert.SeverityCriticalLevel, "P2": alert.SeverityErrorLevel, "P3": alert.SeverityWarnLevel, "P4": alert.SeverityInfoLevel, "P5": alert.SeverityInfoLevel, }
View Source
var PagerDutyStatusMap = map[string]string{ "triggered": alert.StatusFiring, "resolved": alert.StatusResolved, }
Functions ¶
func Decode ¶
func Decode(sourceFrom ainput.SourceFrom, data []byte) ([]ainput.AlertEvent, error)
func DecodeEvent ¶
func ToTimeHookFunc ¶
func ToTimeHookFunc() mapstructure.DecodeHookFunc
Types ¶
type DatadogDecoder ¶
type DatadogDecoder struct{}
func (DatadogDecoder) Decode ¶
func (d DatadogDecoder) Decode(sourceFrom alert.SourceFrom, data []byte) ([]alert.AlertEvent, error)
type DatadogPayload ¶
type DatadogPayload struct {
AlertID string `json:"alert_id"`
AggRegKey string `json:"agg_reg_key"`
AlertType string `json:"alert_type"`
AlertQuery string `json:"alert_query"`
AlertTitle string `json:"alert_title"`
AlertCircleKey string `json:"alert_cycle_key"`
AlertTransition string `json:"alert_transition"`
ID string `json:"id"` // EventID
EventTitle string `json:"event_title"`
EventType string `json:"event_type"`
EventMsg string `json:"event_msg"`
LastUpdated string `json:"last_updated"`
AlertPriority string `json:"alert_priority"`
Tags string `json:"tags"`
Date string `json:"date"`
OrgID string `json:"org_id"`
OrgName string `json:"org_name"`
}
type Decoder ¶
type Decoder interface {
Decode(sourceFrom ainput.SourceFrom, data []byte) ([]ainput.AlertEvent, error)
}
type ErrDecoderNotFound ¶
type ErrDecoderNotFound struct {
InputType string
}
func (ErrDecoderNotFound) Error ¶
func (e ErrDecoderNotFound) Error() string
type JsonDecoder ¶
type JsonDecoder struct{}
func (JsonDecoder) Decode ¶
func (d JsonDecoder) Decode(sourceFrom alert.SourceFrom, data []byte) ([]alert.AlertEvent, error)
type PagerDutyDecoder ¶
type PagerDutyDecoder struct{}
func (PagerDutyDecoder) Decode ¶
func (d PagerDutyDecoder) Decode(sourceFrom alert.SourceFrom, data []byte) ([]alert.AlertEvent, error)
type PagerDutyEvent ¶
type PrometheusDecoder ¶
type PrometheusDecoder struct{}
func (PrometheusDecoder) Decode ¶
func (d PrometheusDecoder) Decode(sourceFrom alert.SourceFrom, data []byte) ([]alert.AlertEvent, error)
type ZabbixDecoder ¶
type ZabbixDecoder struct {
// contains filtered or unexported fields
}
func (ZabbixDecoder) Decode ¶
func (d ZabbixDecoder) Decode(sourceFrom alert.SourceFrom, data []byte) ([]alert.AlertEvent, error)
Click to show internal directories.
Click to hide internal directories.