esapialerts

package
v0.0.0-...-7538329 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertAPISpec

type AlertAPISpec struct {
	Name     string           `json:"name"`
	Type     string           `json:"type"`
	Enabled  bool             `json:"enabled"`
	Schedule MonitorSchedule  `json:"schedule"`
	Inputs   []MonitorInput   `json:"inputs"`
	Triggers []MonitorTrigger `json:"triggers"`
}

AlertAPISpec defines ES alerts API

type ConditionScript

type ConditionScript struct {
	Source string `json:"source"`
	Lang   string `json:"lang"`
}

ConditionScript defines language and script to execute

type InputSearch

type InputSearch struct {
	Indices []string        `json:"indices"`
	Query   json.RawMessage `json:"query"`
}

InputSearch defines search queries and indices

type MonitorInput

type MonitorInput struct {
	Search InputSearch `json:"search"`
}

MonitorInput defines search queries

type MonitorSchedule

type MonitorSchedule struct {
	Period SchedulePeroid `json:"period"`
}

MonitorSchedule defines schedule period

type MonitorTrigger

type MonitorTrigger struct {
	Name      string           `json:"name"`
	Severity  string           `json:"severity"`
	Condition TriggerCondition `json:"condition"`
	Actions   []TriggerAction  `json:"actions"`
}

MonitorTrigger defines triggers and required actions

type SchedulePeroid

type SchedulePeroid struct {
	Interval int    `json:"interval"`
	Unit     string `json:"unit"`
}

SchedulePeroid defines schedule time period

type TextTemplate

type TextTemplate struct {
	Source string `json:"source"`
	Lang   string `json:"lang"`
}

TextTemplate defines alert text template

type TriggerAction

type TriggerAction struct {
	Name            string       `json:"name"`
	Destination     string       `json:"destination_id"`
	SubjectTemplate TextTemplate `json:"subject_template"`
	MessageTemplate TextTemplate `json:"message_template"`
}

TriggerAction defines alerting destination and templates

type TriggerCondition

type TriggerCondition struct {
	Script ConditionScript `json:"script"`
}

TriggerCondition defines condition to trigger alert

type TriggerThrottle

type TriggerThrottle struct {
	Value int    `json:"value"`
	Unit  string `json:"unit"`
}

TriggerThrottle defines alerting throttle

Jump to

Keyboard shortcuts

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