v1

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: GPL-2.0 Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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