Documentation ¶
Index ¶
- type Handler
- func (h *Handler) EnrichTopology(alert *alertmanager.Alert, nodes map[string]map[string]interface{})
- func (h *Handler) FaultsToAlerts(faults []of.Map, nodes map[string]map[string]interface{}) ([]*alertmanager.Alert, error)
- func (h *Handler) GetAlertConfig(fault of.ACIFaultRaw) (string, *aci_config.AlertConfig, error)
- func (h *Handler) GetConsulNodes() []string
- func (h *Handler) InitHandler()
- func (h *Handler) LoadConfig(cfg of.Decoder, fileName string)
- func (h *Handler) PushAlerts()
- func (h *Handler) Run()
- func (h *Handler) Shutdown() error
- func (h *Handler) Throttle(totalCount int, f func(int, int))
- func (h *Handler) VerifiedHost(aciHost string) (string, string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct { Config *of.ACIConfig Aci *acigo.ACIClient Ams *alertmanager.AlertService Log *logger.Logger // contains filtered or unexported fields }
func (*Handler) EnrichTopology ¶
func (h *Handler) EnrichTopology(alert *alertmanager.Alert, nodes map[string]map[string]interface{})
Wrapper to update Labels with node and subsystem.
func (*Handler) FaultsToAlerts ¶
func (h *Handler) FaultsToAlerts(faults []of.Map, nodes map[string]map[string]interface{}) ([]*alertmanager.Alert, error)
Convert acigo faults to Alertmanager alerts.
func (*Handler) GetAlertConfig ¶
func (h *Handler) GetAlertConfig(fault of.ACIFaultRaw) (string, *aci_config.AlertConfig, error)
func (*Handler) GetConsulNodes ¶
GetConsulNodes Lists the nodes from consul, matching given service and node metadata
func (*Handler) InitHandler ¶
func (h *Handler) InitHandler()
func (*Handler) LoadConfig ¶
Wrapper to read a file into an implementation of of.Decoder.
func (*Handler) PushAlerts ¶
func (h *Handler) PushAlerts()
Pull ACI faults and forward to Alertmanager.
Click to show internal directories.
Click to hide internal directories.