telemetry

package
v0.0.0-...-955c50f Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 20 Imported by: 1

Documentation

Overview

Package telemetry is used to schedule and send the audit logs to MGS

Index

Constants

View Source
const (
	EventLogDelayFactor   = 12600 // 12600 seconds - 3.5 hrs
	EventLogDelayBase     = 900   // 900 seconds
	EventLogFreqHrs       = 5     // 5 hrs
	MGSJitterMilliSeconds = 4000  // 4 seconds
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentTelemetry

type AgentTelemetry struct {
	SchemaVersion               int    `json:"SchemaVersion"`
	NumberOfAgentReboot         int    `json:"NumberOfAgentReboot"`
	NumberOfSSMWorkerReboot     int    `json:"NumberOfSSMWorkerReboot"`
	NumberOfInProcExecuterStart int    `json:"NumberOfInProcExecuterStart"`
	AgentVersion                string `json:"AgentVersion"`
}

AgentTelemetry is the agent health message format being used as payload for MGS message

type AgentUpdateResultDiagnosis

type AgentUpdateResultDiagnosis struct {
	SchemaVersion         int    `json:"SchemaVersion"`
	AgentUpdateResultCode string `json:"AgentUpdateResultCode"`
	SourceVersion         string `json:"SourceVersion"`
	TargetVersion         string `json:"TargetVersion"`
}

AgentUpdateCodes is the agent health message format being used as payload for MGS message

type AuditLogTelemetry

type AuditLogTelemetry struct {
	// contains filtered or unexported fields
}

AuditLogTelemetry helps us in scheduling the process to send audit logs to MGS

func GetAuditLogTelemetryInstance

func GetAuditLogTelemetryInstance(ctx context.T, channel communicator.IWebSocketChannel) *AuditLogTelemetry

GetAuditLogTelemetryInstance returns us the singleton instance of AuditLogTelemetry

func (*AuditLogTelemetry) ScheduleAuditEvents

func (a *AuditLogTelemetry) ScheduleAuditEvents()

ScheduleAuditEvents sets up the scheduler

func (*AuditLogTelemetry) SendAuditMessage

func (a *AuditLogTelemetry) SendAuditMessage()

SendAuditMessage triggers the send process in a separate go routine

func (*AuditLogTelemetry) StopScheduler

func (a *AuditLogTelemetry) StopScheduler()

StopScheduler stops the scheduler

type IAuditLogTelemetry

type IAuditLogTelemetry interface {
	ScheduleAuditEvents()
	SendAuditMessage()
	StopScheduler()
}

IAuditLogTelemetry is the scheduler used for the AuditLogScheduler

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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