v1

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: GPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IcingaStatus

type IcingaStatus struct {
	// Note: Icinga2Environment is not related to the environment_id used throughout Icinga DB.
	Icinga2Environment         string          `json:"environment"`
	NodeName                   string          `json:"node_name"`
	Version                    string          `json:"version"`
	ProgramStart               types.UnixMilli `json:"program_start"`
	EndpointId                 types.Binary    `json:"endpoint_id"`
	NotificationsEnabled       types.Bool      `json:"enable_notifications"`
	ActiveServiceChecksEnabled types.Bool      `json:"enable_service_checks"`
	ActiveHostChecksEnabled    types.Bool      `json:"enable_host_checks"`
	EventHandlersEnabled       types.Bool      `json:"enable_event_handlers"`
	FlapDetectionEnabled       types.Bool      `json:"enable_flapping"`
	PerformanceDataEnabled     types.Bool      `json:"enable_perfdata"`
}

IcingaStatus defines Icinga status information.

type StatsMessage

type StatsMessage map[string]interface{}

StatsMessage represents a message from the Redis stream icinga:stats.

func (StatsMessage) IcingaStatus

func (m StatsMessage) IcingaStatus() (*IcingaStatus, error)

IcingaStatus extracts Icinga status information from the message into IcingaStatus and returns it.

func (StatsMessage) Raw

func (m StatsMessage) Raw() map[string]interface{}

Raw returns the key-value pairs of the message.

func (StatsMessage) Time

func (m StatsMessage) Time() (*types.UnixMilli, error)

Time extracts the timestamp of the message into types.UnixMilli and returns it.

Jump to

Keyboard shortcuts

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