checkes

package
v7.0.8 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckILMError

func CheckILMError(c *cli.Context) error

CheckILMError Wrap cli argument and call check

func CheckILMStatus

func CheckILMStatus(c *cli.Context) error

CheckILMStatus wrap cli with monitoring check

func CheckIndiceLocked

func CheckIndiceLocked(c *cli.Context) error

CheckIndiceLocked wrap command line to check

func CheckSLMError

func CheckSLMError(c *cli.Context) error

CheckSLMError wrap command line to check

func CheckSLMPolicy added in v7.0.7

func CheckSLMPolicy(c *cli.Context) error

CheckSLMPolicy wrap command line to check

func CheckSLMStatus

func CheckSLMStatus(c *cli.Context) error

CheckSLMStatus wrap command line to check

func CheckTransformError added in v7.0.4

func CheckTransformError(c *cli.Context) error

CheckILMError Wrap cli argument and call check

Types

type CheckES

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

CheckES is implementation of MonitorES

func (*CheckES) CheckILMError

func (h *CheckES) CheckILMError(indiceName string, excludeIndices []string) (*nagiosPlugin.Monitoring, error)

CheckILMError check that there are no ILM policy failed on indice name

func (*CheckES) CheckILMStatus

func (h *CheckES) CheckILMStatus() (*nagiosPlugin.Monitoring, error)

CheckILMStatus check the status of ILM is running

func (*CheckES) CheckIndiceLocked

func (h *CheckES) CheckIndiceLocked(indiceName string) (*nagiosPlugin.Monitoring, error)

CheckIndiceLocked check that there are indice locked by security (read_only_allow_delete)

func (*CheckES) CheckSLMError

func (h *CheckES) CheckSLMError(snapshotRepositoryName string) (*nagiosPlugin.Monitoring, error)

CheckSLMError check that there are no ILM policy failed on indice name

func (*CheckES) CheckSLMPolicy added in v7.0.7

func (h *CheckES) CheckSLMPolicy(policyName string) (*nagiosPlugin.Monitoring, error)

CheckSLMPolicy check that there are no SLM policy failed

func (*CheckES) CheckSLMStatus

func (h *CheckES) CheckSLMStatus() (*nagiosPlugin.Monitoring, error)

CheckSLMStatus check that SLM service is running

func (*CheckES) CheckTransformError added in v7.0.4

func (h *CheckES) CheckTransformError(transformName string, excludeTransforms []string) (*nagiosPlugin.Monitoring, error)

CheckTransformError check that there are no transform failed

type ILMExplain

type ILMExplain struct {
	Index    string    `json:"index,omitempty"`
	Policy   string    `json:"policy,omitempty"`
	StepInfo *StepInfo `json:"step_info,omitempty"`
}

ILMExplain is the API response

type ILMExplainResponse

type ILMExplainResponse struct {
	Indices map[string]ILMExplain `json:"indices,omitempty"`
}

ILMExplainResponse is the API response

type ILMStatusResponse

type ILMStatusResponse struct {
	OperationMode string `json:"operation_mode,omitempty"`
}

ILMStatusResponse is the API response

type IndiceSetting

type IndiceSetting struct {
	Blocks *IndiceSettingBlock `json:"blocks,omitempty"`
}

IndiceSetting is API response

type IndiceSettingBlock

type IndiceSettingBlock struct {
	Read                string `json:"read,omitempty"`
	ReadOnlyAllowDelete string `json:"read_only_allow_delete,omitempty"`
	ReadOnly            string `json:"read_only,omitempty"`
	Write               string `json:"write,omitempty"`
}

IndiceSettingBlock is API response

type IndiceSettingResponse

type IndiceSettingResponse struct {
	Settings *IndiceSettings `json:"settings"`
}

IndiceSettingResponse is API response

type IndiceSettings

type IndiceSettings struct {
	Indice *IndiceSetting `json:"index"`
}

IndiceSettings is API response

type MonitorES

type MonitorES interface {
	CheckILMError(indiceName string, excludeIndices []string) (*nagiosPlugin.Monitoring, error)
	CheckILMStatus() (*nagiosPlugin.Monitoring, error)
	CheckSLMError(snapshotRepositoryName string) (*nagiosPlugin.Monitoring, error)
	CheckSLMStatus() (*nagiosPlugin.Monitoring, error)
	CheckSLMPolicy(policyName string) (*nagiosPlugin.Monitoring, error)
	CheckIndiceLocked(indiceName string) (*nagiosPlugin.Monitoring, error)
	CheckTransformError(transformName string, excludeTransforms []string) (*nagiosPlugin.Monitoring, error)
}

MonitorES is interface of elasticsearch monitoring

func NewCheckES

func NewCheckES(URL string, username string, password string, disableTLSVerification bool) (MonitorES, error)

NewCheckES permit to initialize connexion on Elasticsearch cluster

type SLM added in v7.0.7

type SLM struct {
	LastSuccess *SLMStatus `json:"last_success,omitempty"`
	LastFailure *SLMStatus `json:"last_failure,omitempty"`
}

type SLMResponse added in v7.0.7

type SLMResponse map[string]*SLM

type SLMStatus added in v7.0.7

type SLMStatus struct {
	SnapshotName string             `json:"snapshot_name"`
	Time         epoch.Milliseconds `json:"time"`
	Details      string             `json:"details,omitempty"`
}

type SLMStatusResponse

type SLMStatusResponse struct {
	OperationMode string `json:"operation_mode,omitempty"`
}

SLMStatusResponse is the API response

type SnapshotFailure

type SnapshotFailure struct {
	NodeID string `json:"node_id,omitempty"`
	Indice string `json:"index,omitempty"`
	Reason string `json:"reason,omitempty"`
	Status string `json:"status,omitempty"`
}

SnapshotFailure is the API response

type SnapshotResponse

type SnapshotResponse struct {
	Snapshot           string            `json:"snapshot,omitempty"`
	Indices            []string          `json:"indices,omitempty"`
	IncludeGlobalState bool              `json:"include_global_state,omitempty"`
	Metadata           map[string]string `json:"metadata,omitempty"`
	State              string            `json:"state,omitempty"`
	Failures           []SnapshotFailure `json:"failures,omitempty"`
	StartTime          time.Time         `json:"start_time,omitempty"`
	EndTime            time.Time         `json:"end_time,omitempty"`
}

SnapshotResponse is the API response

type SnapshotsResponse

type SnapshotsResponse struct {
	Snaphots []SnapshotResponse `json:"snapshots"`
}

SnapshotsResponse is the API response

type StepInfo

type StepInfo struct {
	Type       string `json:"type,omitempty"`
	Reason     string `json:"reason,omitempty"`
	StackTrace string `json:"stack_trace,omitempty"`
}

StepInfo is the API response

type TransformStatData added in v7.0.4

type TransformStatData struct {
	ID     string `json:"id"`
	State  string `json:"state"`
	Reason string `json:"reason,omitempty"`
}

TransformStatData is the transform stats data response

type TransformStatsData added in v7.0.4

type TransformStatsData struct {
	TransformStats []TransformStatData `json:"transforms"`
}

TransformStatsData is the transform stats data response

Jump to

Keyboard shortcuts

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