esanalyzer

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analyzer

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

Analyzer is the background sub-system to query ElasticSearch and execute mitigations

func New

func New(
	svcClient workflowserviceclient.Interface,
	frontendClient frontend.Client,
	clientBean client.Bean,
	esClient es.GenericClient,
	esConfig *config.ElasticSearchConfig,
	logger log.Logger,
	tallyScope tally.Scope,
	resource resource.Resource,
	domainCache cache.DomainCache,
	config *Config,
) *Analyzer

New returns a new instance as daemon

func (*Analyzer) Start

func (a *Analyzer) Start() error

Start starts the scanner

func (*Analyzer) StartDomainWFTypeCountWorkflow added in v1.0.0

func (a *Analyzer) StartDomainWFTypeCountWorkflow(ctx context.Context)

func (*Analyzer) StartWorkflow

func (a *Analyzer) StartWorkflow(ctx context.Context)

type Config

type Config struct {
	ESAnalyzerPause                          dynamicconfig.BoolPropertyFn
	ESAnalyzerTimeWindow                     dynamicconfig.DurationPropertyFn
	ESAnalyzerMaxNumDomains                  dynamicconfig.IntPropertyFn
	ESAnalyzerMaxNumWorkflowTypes            dynamicconfig.IntPropertyFn
	ESAnalyzerLimitToTypes                   dynamicconfig.StringPropertyFn
	ESAnalyzerEnableAvgDurationBasedChecks   dynamicconfig.BoolPropertyFn
	ESAnalyzerLimitToDomains                 dynamicconfig.StringPropertyFn
	ESAnalyzerNumWorkflowsToRefresh          dynamicconfig.IntPropertyFnWithWorkflowTypeFilter
	ESAnalyzerBufferWaitTime                 dynamicconfig.DurationPropertyFnWithWorkflowTypeFilter
	ESAnalyzerMinNumWorkflowsForAvg          dynamicconfig.IntPropertyFnWithWorkflowTypeFilter
	ESAnalyzerWorkflowDurationWarnThresholds dynamicconfig.StringPropertyFn
	ESAnalyzerWorkflowVersionDomains         dynamicconfig.StringPropertyFn
	ESAnalyzerWorkflowTypeDomains            dynamicconfig.StringPropertyFn
}

Config contains all configs for ElasticSearch Analyzer

type DomainWorkflowTypeCount added in v1.0.0

type DomainWorkflowTypeCount struct {
	WorkflowTypes []EsAggregateCount `json:"buckets"`
}

type DomainWorkflowVersionCount added in v1.0.0

type DomainWorkflowVersionCount struct {
	WorkflowTypes []WorkflowTypeCount `json:"buckets"`
}

type EsAggregateCount added in v1.0.0

type EsAggregateCount struct {
	AggregateKey   string `json:"key"`
	AggregateCount int64  `json:"doc_count"`
}

type Workflow

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

type WorkflowTypeCount added in v1.0.0

type WorkflowTypeCount struct {
	EsAggregateCount
	WorkflowVersions WorkflowVersionCount `json:"versions"`
}

type WorkflowVersionCount added in v1.0.0

type WorkflowVersionCount struct {
	WorkflowVersions []EsAggregateCount `json:"buckets"`
}

Jump to

Keyboard shortcuts

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