canopsis

package
v0.0.0-...-6af633f Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2025 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultEventWorkers         = 10
	DefaultUserEventWorkers     = 2
	DefaultSystemEventWorkers   = 4
	DefaultExternalEventWorkers = 4
	DefaultRpcWorkers           = 4
)

Workers

View Source
const (
	AppName = "canopsis"

	ActionEngineName       = "engine-action"
	ApiName                = "api"
	AxeEngineName          = "engine-axe"
	CheEngineName          = "engine-che"
	CorrelationEngineName  = "engine-correlation"
	DynamicInfosEngineName = "engine-dynamic-infos"
	FIFOEngineName         = "engine-fifo"
	PBehaviorEngineName    = "engine-pbehavior"
	RemediationEngineName  = "engine-remediation"
	SnmpEngineName         = "engine-snmp"
	WebhookEngineName      = "engine-webhook"
)

App names

View Source
const (
	ActionConnector      = "action"
	ApiConnector         = "api"
	AxeConnector         = "axe"
	CheConnector         = "che"
	CorrelationConnector = "correlation"
	PBehaviorConnector   = "pbehavior"
	RemediationConnector = "remediation"

	DefaultSystemAlarmConnector = "system"
)

Internal connectors

View Source
const (
	DefaultExchangeName = ""
	EngineExchangeName  = "canopsis.engine"
	EventsExchangeName  = "canopsis.events"
)

Exchanges

View Source
const (
	ActionQueuePrefix           = "Engine_action"
	ActionExternalQueueName     = ActionQueuePrefix + "_external"
	ActionSystemQueueName       = ActionQueuePrefix + "_system"
	ActionUserQueueName         = ActionQueuePrefix + "_user"
	ActionAxeRPCClientQueueName = ActionQueuePrefix + "_axe_rpc_client"

	AxeQueuePrefix                    = "Engine_axe"
	AxeExternalQueueName              = AxeQueuePrefix + "_external"
	AxeSystemQueueName                = AxeQueuePrefix + "_system"
	AxeUserQueueName                  = AxeQueuePrefix + "_user"
	AxePbehaviorRPCClientQueueName    = AxeQueuePrefix + "_pbehavior_rpc_client"
	AxeDynamicInfosRPCClientQueueName = AxeQueuePrefix + "_dynamic_infos_rpc_client"
	AxeRPCQueueServerName             = AxeQueuePrefix + "_rpc_server"

	CheQueuePrefix       = "Engine_che"
	CheExternalQueueName = CheQueuePrefix + "_external"
	CheSystemQueueName   = CheQueuePrefix + "_system"
	CheUserQueueName     = CheQueuePrefix + "_user"

	CorrelationQueuePrefix           = "Engine_correlation"
	CorrelationExternalQueueName     = CorrelationQueuePrefix + "_external"
	CorrelationSystemQueueName       = CorrelationQueuePrefix + "_system"
	CorrelationUserQueueName         = CorrelationQueuePrefix + "_user"
	CorrelationAxeRPCClientQueueName = CorrelationQueuePrefix + "_axe_rpc_client"

	DynamicInfosQueuePrefix        = "Engine_dynamic_infos"
	DynamicInfosExternalQueueName  = DynamicInfosQueuePrefix + "_external"
	DynamicInfosSystemQueueName    = DynamicInfosQueuePrefix + "_system"
	DynamicInfosUserQueueName      = DynamicInfosQueuePrefix + "_user"
	DynamicInfosRPCQueueServerName = DynamicInfosQueuePrefix + "_rpc_server"

	FIFOQueueName    = "Engine_fifo"
	FIFOAckQueueName = "FIFO_ack"

	PBehaviorRPCQueueServerName = "Engine_pbehavior_rpc_server"
	PBehaviorQueueRecomputeName = "Engine_pbehavior_recompute"

	RemediationRPCQueueServerName    = "Engine_remediation_rpc_server"
	RemediationRPCQueueServerJobName = "Engine_remediation_rpc_server_job"

	WebhookRPCQueueServerName = "Engine_webhook_rpc_server"
)

Queues

View Source
const (
	ActionExternalConsumerName = "action_external"
	ActionSystemConsumerName   = "action_system"
	ActionUserConsumerName     = "action_user"
	ActionRPCConsumerName      = "action_rpc"

	AxeExternalConsumerName = "axe_external"
	AxeSystemConsumerName   = "axe_system"
	AxeUserConsumerName     = "axe_user"
	AxeRPCConsumerName      = "axe_rpc"

	CheExternalConsumerName = "che_external"
	CheSystemConsumerName   = "che_system"
	CheUserConsumerName     = "che_user"

	CorrelationExternalConsumerName = "correlation_external"
	CorrelationSystemConsumerName   = "correlation_system"
	CorrelationUserConsumerName     = "correlation_user"
	CorrelationRPCConsumerName      = "correlation_rpc"

	DynamicInfosExternalConsumerName = "dynamic_infos_external"
	DynamicInfosSystemConsumerName   = "dynamic_infos_system"
	DynamicInfosUserConsumerName     = "dynamic_infos_user"
	DynamicInfosRPCConsumerName      = "dynamic_infos_rpc"

	FIFOConsumerName    = "fifo"
	FIFOAckConsumerName = "fifo_ack"

	PBehaviorRPCConsumerName = "pbehavior_rpc"
	PBehaviorConsumerName    = "pbehavior"

	RemediationRPCConsumerName = "remediation_rpc"

	WebhookRPCConsumerName = "webhook_rpc"
)

Consumers

View Source
const (
	DefaultBulkSize      = 1000
	DefaultBulkBytesSize = 16000000 // < MongoDB limit (16 megabytes)

	DefaultEventAuthor = "system"

	JsonContentType = "application/json"

	RecorderConsumerName    = "recorder"
	RecorderRPCConsumerName = "recorder_rpc"

	PeriodicalWaitTime       = time.Minute
	TechMetricsFlushInterval = time.Second * 10
	DefaultFlushInterval     = time.Second * 5

	FacetLimit = 1000

	SubDirUpload   = "upload-files"
	SubDirIcons    = "icons"
	SubDirExport   = "export-files"
	SubDirImport   = "import-files"
	SubDirJunit    = "junit-files"
	SubDirJunitAPI = "junit-api-files"
)

Other

Variables

View Source
var BuildDate string

BuildDate is a Unix timestamp (as a string).

View Source
var Version string

Version is a version of service.

Functions

func PrintVersionInfo

func PrintVersionInfo()

Types

type BuildInfo

type BuildInfo struct {
	Name        string
	Version     string
	Edition     string
	Date        time.Time
	VcsRevision string
	GoVersion   string
	Os          string
}

func GetBuildInfo

func GetBuildInfo() BuildInfo

Directories

Path Synopsis
Package contextgraph contains a service, which is responsible for building canopsis context graph.
Package contextgraph contains a service, which is responsible for building canopsis context graph.
xml
Package engine contain implementation of canopsis engine.
Package engine contain implementation of canopsis engine.
Package idlealarm implements alarm modification on idle alarm.
Package idlealarm implements alarm modification on idle alarm.
Package idlerule contains idle rule model and adapter.
Package idlerule contains idle rule model and adapter.
Package pattern provides functionality for filtering and matching models.
Package pattern provides functionality for filtering and matching models.
db

Jump to

Keyboard shortcuts

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