telemetry

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: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LastSuccessfulSync com.Atomic[SuccessfulSync]

LastSuccessfulSync is to be updated by the main() function.

View Source
var OngoingSyncStartMilli int64

OngoingSyncStartMilli is to be updated by the main() function.

View Source
var Stats struct {
	// Config & co. are to be increased by the T sync once for every T object synced.
	Config, State, History, Overdue, HistoryCleanup com.Counter
}

Functions

func GetCurrentDbConnErr

func GetCurrentDbConnErr() (string, int64)

GetCurrentDbConnErr returns the last error message (or the empty string if not in an error state) and a timestamp in milliseconds of the last change from OK to error or from error to OK.

func NewGoMetrics

func NewGoMetrics() *goMetrics

func StartHeartbeat

func StartHeartbeat(
	ctx context.Context, client *icingaredis.Client, logger *logging.Logger, ha ha, heartbeat *icingaredis.Heartbeat,
)

StartHeartbeat periodically writes heartbeats to Redis for being monitored by Icinga 2.

func UpdateCurrentDbConnErr

func UpdateCurrentDbConnErr(err error)

UpdateCurrentDbConnErr updates the current error information stored in currentDbConnErr.

func WriteStats

func WriteStats(ctx context.Context, client *icingaredis.Client, logger *logging.Logger)

WriteStats periodically forwards Stats to Redis for being monitored by Icinga 2.

Types

type SuccessfulSync

type SuccessfulSync struct {
	FinishMilli   int64
	DurationMilli int64
}

Jump to

Keyboard shortcuts

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