influx

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Collects and exports all flows to influxdb for long term storage. Tags to configure for Influxdb are from the protobuf definition. Supported Tags are: Cid,ProtoName,RemoteCountry,SamplerAddress,SrcIfDesc,DstIfDesc If no Tags are provided 'ProtoName' will be the only Tag used by default.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connector

type Connector struct {
	Address    string
	Org        string
	Bucket     string
	Token      string
	ExportFreq int
	Batchsize  int
	Tags       []string
	Fields     []string
	// contains filtered or unexported fields
}

Connector provides export features to Influx

func (*Connector) CreatePoint

func (c *Connector) CreatePoint(msg *pb.EnrichedFlow) *write.Point

func (*Connector) Initialize

func (c *Connector) Initialize()

Initialize a connection to Influxdb

type Influx

type Influx struct {
	segments.BaseSegment
	Address string   // optional, URL for influxdb endpoint, default is http://127.0.0.1:8086
	Org     string   // required, Influx org name
	Bucket  string   // required, Influx bucket
	Token   string   // required, Influx access token
	Tags    []string // optional, list of Tags to be created.
	Fields  []string // optional, list of Fields to be created, default is "Bytes,Packets"
}

func (Influx) New

func (segment Influx) New(config map[string]string) segments.Segment

func (*Influx) Run

func (segment *Influx) Run(wg *sync.WaitGroup)

Jump to

Keyboard shortcuts

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