icinga2

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Tag          string
	DashboardURL string
	common.HTTPConfig
}

type Connector

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

func NewConnector

func NewConnector(cfg *Config) *Connector

func (*Connector) Collect

func (c *Connector) Collect(ctx context.Context) ([]connectors.Alert, error)

func (*Connector) Silence

func (c *Connector) Silence(ctx context.Context, alert connectors.Alert, duration time.Duration, user string) error

func (*Connector) String

func (c *Connector) String() string

func (*Connector) Tag

func (c *Connector) Tag() string

type Host

type Host struct {
	DisplayName         string   `json:"display_name"`
	State               int      `json:"state"`
	LastStateChange     float64  `json:"last_state_change"`
	Acknowledgement     int      `json:"acknowledgement"`
	DowntimeDepth       int      `json:"downtime_depth"`
	EnableNotifications bool     `json:"enable_notifications"`
	Output              string   `json:"output"`
	MaxCheckAttempts    int      `json:"max_check_attempts"`
	CheckAttempt        int      `json:"check_attempt"`
	Groups              []string `json:"groups"`
}

type HostAttrs

type HostAttrs struct {
	Host Host `json:"attrs"`
}

type HostResponse

type HostResponse struct {
	Results []HostAttrs `json:"results"`
}

type ServiceResponse

type ServiceResponse struct {
	Results []serviceAttrs `json:"results"`
}

Jump to

Keyboard shortcuts

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