influxdb

package
Version: v0.0.0-...-9cb8e21 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EventName is the constant used to store the name of the event type
	EventName = "EventName"

	// EventTypeFlow is the constant used to store event of type flows
	EventTypeFlow = "FlowEvents"

	// EventTypeContainer is the constant used to store event of type container
	EventTypeContainer = "ContainerEvents"

	// EventTypeContainerStart is the constant used to store event of type container start
	EventTypeContainerStart = "ContainerStartEvents"

	// EventTypeContainerStop is the constant used to store event of type container stop
	EventTypeContainerStop = "ContainerStopEvents"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DataAdder

type DataAdder interface {
	CreateDB(string) error
	AddData(tags map[string]string, fields map[string]interface{}) error
	ExecuteQuery(query string, dbname string) (*client.Response, error)
}

DataAdder interface has all the methods required to interact with influxdb api

type Influxdb

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

Influxdb inplements a DataAdder interface for influxDB

func NewDBConnection

func NewDBConnection(user string, pass string, addr string, db string, insecureSkipVerify bool) (*Influxdb, error)

NewDBConnection is used to create a new client and return influxdb handle

func (*Influxdb) AddData

func (d *Influxdb) AddData(tags map[string]string, fields map[string]interface{}) error

AddData is used to add data to the batch

func (*Influxdb) CollectContainerEvent

func (d *Influxdb) CollectContainerEvent(record *tcollector.ContainerRecord)

CollectContainerEvent implements trireme collector interface

func (*Influxdb) CollectCounterEvent

func (d *Influxdb) CollectCounterEvent(report *tcollector.CounterReport)

CollectCounterEvent collect counters from the datapath

func (*Influxdb) CollectDNSRequests

func (d *Influxdb) CollectDNSRequests(report *tcollector.DNSRequestReport)

CollectDNSRequests collect counters from the datapath

func (*Influxdb) CollectFlowEvent

func (d *Influxdb) CollectFlowEvent(record *tcollector.FlowRecord)

CollectFlowEvent implements trireme collector interface

func (*Influxdb) CollectPacketEvent

func (d *Influxdb) CollectPacketEvent(report *tcollector.PacketReport)

CollectPacketEvent collects packet events from the datapath

func (*Influxdb) CollectTraceEvent

func (d *Influxdb) CollectTraceEvent(records []string)

CollectTraceEvent collects iptables trace events

func (*Influxdb) CollectUserEvent

func (d *Influxdb) CollectUserEvent(record *tcollector.UserRecord)

CollectUserEvent implements trireme collector interface

func (*Influxdb) CreateDB

func (d *Influxdb) CreateDB(dbname string) error

CreateDB is used to create a new databases given name

func (*Influxdb) ExecuteQuery

func (d *Influxdb) ExecuteQuery(query string, dbname string) (*client.Response, error)

ExecuteQuery is used to execute a query given a database name

func (*Influxdb) Start

func (d *Influxdb) Start() error

Start is used to start listening for data

func (*Influxdb) Stop

func (d *Influxdb) Stop() error

Stop is used to stop and return from listen goroutine

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL