techmetrics

package
v0.0.0-...-9b5cd94 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CanopsisEvent     = "cps_event"
	FIFOEvent         = "fifo_event"
	CheEvent          = "che_event"
	AxeEvent          = "axe_event"
	CorrelationEvent  = "correlation_event"
	ServiceEvent      = "service_event"
	DynamicInfosEvent = "dynamic_infos_event"
	ActionEvent       = "action_event"

	FIFOQueue           = "fifo_queue"
	AxePeriodical       = "axe_periodical"
	PBehaviorPeriodical = "pbehavior_periodical"
	CheInfos            = "che_infos"
	ApiRequests         = "api_requests"

	CorrelationRetries = "correlation_retries"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiRequestMetric

type ApiRequestMetric struct {
	Timestamp time.Time
	Interval  time.Duration
	Method    string
	Url       string
}

type AxeEventMetric

type AxeEventMetric struct {
	EventMetric
	EntityType      string
	AlarmChangeType string
}

type AxePeriodicalMetric

type AxePeriodicalMetric struct {
	PeriodicalMetric
	Events int64
}

type CheEventMetric

type CheEventMetric struct {
	EventMetric
	EntityType        string
	IsNewEntity       bool
	IsInfosUpdated    bool
	IsServicesUpdated bool
}

type CorrelationRetriesMetric

type CorrelationRetriesMetric struct {
	Timestamp time.Time
	Type      string
	Retries   int
}

type EventMetric

type EventMetric struct {
	Timestamp time.Time
	EventType string
	Interval  time.Duration
}

type PbehaviorPeriodicalMetric

type PbehaviorPeriodicalMetric struct {
	PeriodicalMetric
	Events     int64
	Entities   int64
	Pbehaviors int64
}

type PeriodicalMetric

type PeriodicalMetric struct {
	Timestamp time.Time
	Interval  time.Duration
}

type Sender

type Sender interface {
	Run(ctx context.Context)

	SendSimpleEvent(metricName string, metric EventMetric)

	SendQueue(metricName string, timestamp time.Time, length int64)

	SendCheEntityInfo(timestamp time.Time, name string)
	SendCheEvent(metric CheEventMetric)

	SendAxePeriodical(metric AxePeriodicalMetric)
	SendAxeEvent(metric AxeEventMetric)

	SendPBehaviorPeriodical(metric PbehaviorPeriodicalMetric)

	SendApiRequest(metric ApiRequestMetric)

	SendCorrelationRetries(metric CorrelationRetriesMetric)
}

func NewSender

func NewSender(
	configProvider config.TechMetricsConfigProvider,
	interval time.Duration,
	poolRetryCount int,
	poolRetryTimeout time.Duration,
	logger zerolog.Logger,
) Sender

Jump to

Keyboard shortcuts

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