freepsflux

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FieldWithType

type FieldWithType struct {
	FieldType  string
	FieldValue string
}

type FreepsFlux

type FreepsFlux struct {
	Verbose bool
	// contains filtered or unexported fields
}

func NewFreepsFlux

func NewFreepsFlux(conf *FreepsFluxConfig, f *freepslib.Freeps) (*FreepsFlux, error)

func (*FreepsFlux) DeviceListToLineProtocol

func (ff *FreepsFlux) DeviceListToLineProtocol(devl *freepslib.AvmDeviceList, mTime time.Time, tags map[string]string) (string, error)

func (*FreepsFlux) DeviceListToPoints

func (ff *FreepsFlux) DeviceListToPoints(devl *freepslib.AvmDeviceList, mTime time.Time, f func(*write.Point)) error

func (*FreepsFlux) DeviceListToPointsWithTags added in v1.3.0

func (ff *FreepsFlux) DeviceListToPointsWithTags(devl *freepslib.AvmDeviceList, mTime time.Time, tags map[string]string, f func(*write.Point)) error

func (*FreepsFlux) InitInflux

func (ff *FreepsFlux) InitInflux(reinit bool) error

func (*FreepsFlux) MetricsToLineProtocol

func (ff *FreepsFlux) MetricsToLineProtocol(met *freepslib.FritzBoxMetrics, mTime time.Time) (string, error)

func (*FreepsFlux) MetricsToPoints

func (ff *FreepsFlux) MetricsToPoints(met *freepslib.FritzBoxMetrics, mTime time.Time, f func(*write.Point))

func (*FreepsFlux) NetDeviceListToLineProtocol

func (ff *FreepsFlux) NetDeviceListToLineProtocol(resp *freepslib.AvmDataResponse, mTime time.Time) (string, error)

func (*FreepsFlux) NetDeviceListToPoints

func (ff *FreepsFlux) NetDeviceListToPoints(resp *freepslib.AvmDataResponse, mTime time.Time, f func(*write.Point)) error

func (*FreepsFlux) Push

func (ff *FreepsFlux) Push() error

func (*FreepsFlux) PushFields

func (ff *FreepsFlux) PushFields(measurement string, tags map[string]string, fields map[string]interface{}, ctx *base.Context) error

func (*FreepsFlux) PushFreepsDeviceList

func (ff *FreepsFlux) PushFreepsDeviceList(devl *freepslib.AvmDeviceList, tags map[string]string) (error, string)

func (*FreepsFlux) PushFreepsMetrics

func (ff *FreepsFlux) PushFreepsMetrics(met *freepslib.FritzBoxMetrics) (error, string)

func (*FreepsFlux) PushFreepsNetDeviceList

func (ff *FreepsFlux) PushFreepsNetDeviceList(devl *freepslib.AvmDataResponse) (error, string)

type FreepsFluxConfig

type FreepsFluxConfig struct {
	InfluxdbConnections []InfluxdbConfig
	IgnoreNotPresent    bool
	Enabled             bool
	Namespace           string
}

type InfluxdbConfig

type InfluxdbConfig struct {
	URL    string
	Token  string
	Org    string
	Bucket string
}

type JsonArgs

type JsonArgs struct {
	Measurement      string
	Tags             map[string]string
	Fields           map[string]interface{}
	FieldsWithType   map[string]FieldWithType
	DefaultFieldType string
}

type OperatorFlux added in v1.3.0

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

OperatorFlux is that enabled InfluxDB Flux queries to be executed

func (*OperatorFlux) FieldTypeSuggestions added in v1.3.0

func (o *OperatorFlux) FieldTypeSuggestions() []string

func (*OperatorFlux) GetDefaultConfig added in v1.3.0

func (o *OperatorFlux) GetDefaultConfig() interface{}

GetDefaultConfig returns a copy of the default config

func (*OperatorFlux) InitCopyOfOperator added in v1.3.0

func (o *OperatorFlux) InitCopyOfOperator(ctx *base.Context, config interface{}, name string) (base.FreepsOperatorWithConfig, error)

InitCopyOfOperator creates a copy of the operator and initializes it with the given config

func (*OperatorFlux) PushFields added in v1.3.0

func (o *OperatorFlux) PushFields(ctx *base.Context, input *base.OperatorIO) *base.OperatorIO

func (*OperatorFlux) PushFreepsData added in v1.3.0

func (o *OperatorFlux) PushFreepsData(ctx *base.Context, input *base.OperatorIO) *base.OperatorIO

func (*OperatorFlux) PushFreepsDeviceList added in v1.3.0

func (o *OperatorFlux) PushFreepsDeviceList(ctx *base.Context, input *base.OperatorIO, args base.FunctionArguments) *base.OperatorIO

func (*OperatorFlux) PushFreepsMetrics added in v1.3.0

func (o *OperatorFlux) PushFreepsMetrics(ctx *base.Context, input *base.OperatorIO) *base.OperatorIO

func (*OperatorFlux) PushMeasurement added in v1.3.0

func (o *OperatorFlux) PushMeasurement(ctx *base.Context, input *base.OperatorIO, args PushMeasurementArguments, tags base.FunctionArguments) *base.OperatorIO

func (*OperatorFlux) PushSingleField added in v1.3.0

func (o *OperatorFlux) PushSingleField(ctx *base.Context, input *base.OperatorIO, args PushArguments, tags base.FunctionArguments) *base.OperatorIO

type PushArguments added in v1.3.0

type PushArguments struct {
	Measurement string
	Field       string
	FieldType   *string
}

type PushMeasurementArguments added in v1.3.0

type PushMeasurementArguments struct {
	Measurement string
}

Jump to

Keyboard shortcuts

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