domain

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PriorityCritical = "critical"
	PriorityWarning  = "warning"
)

Functions

This section is empty.

Types

type AlertPolicy

type AlertPolicy struct {
	Policy          Policy            `json:"policy"`
	NrqlConditions  []*NrqlCondition  `json:"nrql_conditions,omitempty"`
	ApmConditions   []*ApmCondition   `json:"conditions,omitempty"`
	InfraConditions []*InfraCondition `json:"conditions,omitempty"`
}

func (AlertPolicy) Equals

func (policy AlertPolicy) Equals(other AlertPolicy) bool

type ApmCondition

type ApmCondition struct {
	Condition ApmConditionBody `json:"condition"`
}

type ApmConditionBody

type ApmConditionBody struct {
	Id       *int64   `json:"id,omitempty"`
	Name     string   `json:"name"`
	Type     string   `json:"type"`
	Enabled  bool     `json:"enabled,omitempty"`
	Entities []string `json:"entities"`

	Metric              string       `json:"metric"`
	ConditionScope      string       `json:"condition_scope"`
	ViolationCloseTimer int          `json:"violation_close_timer"`
	RunbookUrl          string       `json:"runbook_url,omitempty"`
	Terms               []Term       `json:"terms"`
	UserDefined         *UserDefined `json:"user_defined,omitempty"`
}

type ApmConditionList

type ApmConditionList struct {
	Condition []ApmConditionBody `json:"conditions"`
}

type ApmConditionSet

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

func NewApmConditionSet

func NewApmConditionSet(conditions ApmConditionList) *ApmConditionSet

func NewApmConditionSetFromSlice

func NewApmConditionSetFromSlice(conditions []*ApmCondition) *ApmConditionSet

func (ApmConditionSet) Contains

func (set ApmConditionSet) Contains(condition ApmConditionBody) bool

type Expiration added in v1.3.0

type Expiration struct {
	ExpirationDuration          *string `json:"expiration_duration"`
	OpenViolationOnExpiration   bool    `json:"open_violation_on_expiration"`
	CloseViolationsOnExpiration bool    `json:"close_violations_on_expiration"`
}

type InfraCondition

type InfraCondition struct {
	Condition InfraConditionBody `json:"data"`
}

type InfraConditionBody

type InfraConditionBody struct {
	Id       *int64 `json:"id,omitempty"`
	Name     string `json:"name"`
	Type     string `json:"type"`
	PolicyId int64  `json:"policy_id"`

	// +kubebuilder:validation:Enum=equal;above;bellow
	Comparison          string          `json:"comparison"`
	CriticalThreshold   InfraThreshold  `json:"critical_threshold"`
	WarningThreshold    *InfraThreshold `json:"warning_threshold,omitempty"`
	Enabled             bool            `json:"enabled,omitempty"`
	EventType           string          `json:"event_type"`
	IntegrationProvider string          `json:"integration_provider"`
	RunbookUrl          string          `json:"runbook_url,omitempty"`
	SelectValue         string          `json:"select_value"`
	ViolationCloseTimer int             `json:"violation_close_timer,omitempty"`
	WhereClause         string          `json:"where_clause,omitempty"`
}

type InfraConditionList

type InfraConditionList struct {
	Condition []InfraConditionBody `json:"data"`
}

type InfraConditionSet

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

func NewInfraConditionSet

func NewInfraConditionSet(conditions InfraConditionList) *InfraConditionSet

func NewInfraConditionSetFromSlice

func NewInfraConditionSetFromSlice(conditions []*InfraCondition) *InfraConditionSet

func (InfraConditionSet) Contains

func (set InfraConditionSet) Contains(condition InfraConditionBody) bool

type InfraThreshold

type InfraThreshold struct {
	Value           int `json:"value"`
	DurationMinutes int `json:"duration_minutes"`
	// +kubebuilder:validation:Enum=all;any
	TimeFunction string `json:"time_function"`
}

type NewrelicPolicyList

type NewrelicPolicyList struct {
	Policies []Policy `json:"policies"`
}

type Nrql

type Nrql struct {
	Query      string `json:"query"`
	SinceValue string `json:"since_value,omitempty"`
}

type NrqlCondition

type NrqlCondition struct {
	Condition NrqlConditionBody `json:"nrql_condition"`
}

type NrqlConditionBody

type NrqlConditionBody struct {
	Id            *int64      `json:"id,omitempty"`
	Type          string      `json:"type"`
	Name          string      `json:"name"`
	RunbookURL    string      `json:"runbook_url"`
	Enabled       bool        `json:"enabled"`
	Terms         []Term      `json:"terms"`
	ValueFunction string      `json:"value_function"`
	Nrql          Nrql        `json:"nrql"`
	Signal        *Signal     `json:"signal,omitempty"`
	Expiration    *Expiration `json:"expiration,omitempty"`
}

type NrqlConditionList

type NrqlConditionList struct {
	Condition []NrqlConditionBody `json:"nrql_conditions"`
}

type NrqlConditionSet

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

func NewNrqlConditionSet

func NewNrqlConditionSet(conditions NrqlConditionList) *NrqlConditionSet

func NewNrqlConditionSetFromSlice

func NewNrqlConditionSetFromSlice(conditions []*NrqlCondition) *NrqlConditionSet

func (NrqlConditionSet) Contains

func (set NrqlConditionSet) Contains(condition NrqlConditionBody) bool

type Policy

type Policy struct {
	Id                 *int64 `json:"id,omitempty"`
	Name               string `json:"name"`
	IncidentPreference string `json:"incident_preference"`
}

func (Policy) Equals

func (policy Policy) Equals(other Policy) bool

type Signal added in v1.3.0

type Signal struct {
	AggregationWindow string `json:"aggregation_window,omitempty"`
	EvaluationOffset  string `json:"evaluation_offset"`
	FillOption        string `json:"fill_option"`
	FillValue         string `json:"fill_value,omitempty"`
}

type Term

type Term struct {
	Duration     string `json:"duration"`
	Operator     string `json:"operator"`
	Priority     string `json:"priority"`
	Threshold    string `json:"threshold"`
	TimeFunction string `json:"time_function"`
}

type UserDefined

type UserDefined struct {
	Metric        string `json:"metric"`
	ValueFunction string `json:"value_function"`
}

Jump to

Keyboard shortcuts

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