techmetrics

package
v0.0.0-...-8a398ea Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CanopsisEvent     = "cps_event"
	FIFOEvent         = "fifo_event"
	CheEvent          = "che_event"
	AxeEvent          = "axe_event"
	CorrelationEvent  = "correlation_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"

	GoMetrics = "go_metrics"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionEventMetric

type ActionEventMetric struct {
	EventMetric
	ExecutedRules    int64
	ExecutedWebhooks int64
}

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
	IsOkState         *bool
	IsCountersUpdated bool
}

type AxePeriodicalMetric

type AxePeriodicalMetric struct {
	PeriodicalMetric
	Events     int64
	IdleEvents int64
}

type CheEventMetric

type CheEventMetric struct {
	EventMetric
	EntityType            string
	IsNewEntity           bool
	IsInfosUpdated        bool
	IsServicesUpdated     bool
	IsStateSettingUpdated bool
	ExecutedEnrichRules   int64
	ExternalRequests      map[string]int64
}

type CorrelationEventMetric

type CorrelationEventMetric struct {
	EventMetric
	MatchedRuleCount int64
	MatchedRuleTypes []string
}

type CorrelationRetriesMetric

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

type CpsEventMetric

type CpsEventMetric struct {
	EventMetric
	IsOkState *bool
}

type DynamicInfoEventMetric

type DynamicInfoEventMetric struct {
	EventMetric
	ExecutedRules int64
}

type EventMetric

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

type FifoEventMetric

type FifoEventMetric struct {
	EventMetric
	ExternalRequests map[string]int64
}

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)

	SendFifoEvent(metric FifoEventMetric)

	SendCpsEvent(metric CpsEventMetric)

	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)

	SendCorrelationEvent(metric CorrelationEventMetric)
	SendCorrelationRetries(metric CorrelationRetriesMetric)

	SendDynamicInfosEvent(metric DynamicInfoEventMetric)

	SendActionEvent(metric ActionEventMetric)
}

func NewSender

func NewSender(
	instanceId string,
	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