fcinflux

package
v0.0.0-...-32d11fa Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Manage

func Manage(svc *Service) node.Node

Manage implements the API to management protocols like RESTCONF or gNMI to this fc-infludb module itself.

Types

type ConnectionOptions

type ConnectionOptions struct {
	Addr     string
	ApiToken string
}

ConnectionOptions captures the InfluxDB connection details. There more options to add here including TLS and other possible login types

type Metric

type Metric struct {
	Name string
	Tags map[string]string
	Time time.Time
}

Metric is converted to a Influx WritePoint

type Options

type Options struct {
	Connection    ConnectionOptions
	Database      string // added to every metric to distinguish metrics from multiple sources
	Organization  string
	Bucket        string
	Tags          map[string]string // default set of tags for all metrics
	Frequency     time.Duration     // how often to grab metrics
	IgnoreModules []string
	IgnorePaths   []string
}

Config of this service

type Service

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

Service orchestrates all uploads to influxdb

func NewService

func NewService(device device.Device) *Service

NewService is constructor

func (*Service) ApplyOptions

func (svc *Service) ApplyOptions(options Options) error

ApplyOptions will allow for changing config w/o restart.

func (*Service) Options

func (svc *Service) Options() Options

Options is access to config by returning a copy we ensure they cannot be changed w/o calling Apply

func (*Service) Start

func (svc *Service) Start(ticker <-chan time.Time)

Start the polling of metrics.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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