Documentation ¶
Index ¶
- Variables
- func GetCurrentDbConnErr() (string, int64)
- func NewGoMetrics() *goMetrics
- func StartHeartbeat(ctx context.Context, client *icingaredis.Client, logger *logging.Logger, ha ha, ...)
- func UpdateCurrentDbConnErr(err error)
- func WriteStats(ctx context.Context, client *icingaredis.Client, logger *logging.Logger)
- type SuccessfulSync
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 ¶
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 ¶
WriteStats periodically forwards Stats to Redis for being monitored by Icinga 2.
Types ¶
type SuccessfulSync ¶
Click to show internal directories.
Click to hide internal directories.