processor

package
v0.0.0-...-3d2db6d Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2025 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProcessAwsFlowLog

func ProcessAwsFlowLog(awsLog string) map[string]interface{}

func PullLogs

func PullLogs(startTime time.Time, endTime time.Time, group types.ModuleGroup) *logger.Error

func SendToLogstash

func SendToLogstash(data []TransformedLog) *logger.Error

Types

type AWSProcessor

type AWSProcessor struct {
	RegionName      string
	AccessKey       string
	SecretAccessKey string
}

func GetAWSProcessor

func GetAWSProcessor(group types.ModuleGroup) AWSProcessor

func (*AWSProcessor) DescribeLogGroups

func (p *AWSProcessor) DescribeLogGroups() ([]string, *logger.Error)

func (*AWSProcessor) DescribeLogStreams

func (p *AWSProcessor) DescribeLogStreams(logGroup string) ([]string, *logger.Error)

func (*AWSProcessor) GetLogs

func (p *AWSProcessor) GetLogs(startTime, endTime time.Time, group types.ModuleGroup) ([]TransformedLog, *logger.Error)

type TransformedLog

type TransformedLog struct {
	Logx struct {
		Type   string                 `json:"type"`
		Tenant string                 `json:"tenant"`
		AWS    map[string]interface{} `json:"aws"`
	} `json:"logx"`
	Global struct {
		Type     string `json:"type"`
		Analysed int    `json:"analysed"`
	} `json:"global"`
	Timestamp  string `json:"@timestamp"`
	DataType   string `json:"dataType"`
	DataSource string `json:"dataSource"`
}

func ETLProcess

func ETLProcess(events []*cloudwatchlogs.OutputLogEvent, group types.ModuleGroup, logGroup, logStream string) []TransformedLog

Jump to

Keyboard shortcuts

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