influxdb

package
v0.27.1 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2020 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeBatchConfig added in v0.18.0

func MakeBatchConfig(conf Config) client.BatchPointsConfig

func MakeClient added in v0.18.0

func MakeClient(conf Config) (client.Client, error)

Types

type Collector

type Collector struct {
	Client    client.Client
	Config    Config
	BatchConf client.BatchPointsConfig
	// contains filtered or unexported fields
}

func New

func New(conf Config) (*Collector, error)

func (*Collector) Collect

func (c *Collector) Collect(scs []stats.SampleContainer)

func (*Collector) Format added in v0.21.0

func (c *Collector) Format(samples []stats.Sample) ([]string, error)

Format returns a string array of metrics in influx line-protocol

func (*Collector) GetRequiredSystemTags added in v0.20.0

func (c *Collector) GetRequiredSystemTags() stats.SystemTagSet

GetRequiredSystemTags returns which sample tags are needed by this collector

func (*Collector) Init added in v0.12.2

func (c *Collector) Init() error
func (c *Collector) Link() string

func (*Collector) Run

func (c *Collector) Run(ctx context.Context)

func (*Collector) SetRunStatus added in v0.21.1

func (c *Collector) SetRunStatus(status lib.RunStatus)

SetRunStatus does nothing in the InfluxDB collector

type Config added in v0.16.0

type Config struct {
	// Connection.
	Addr             null.String        `json:"addr" envconfig:"K6_INFLUXDB_ADDR"`
	Username         null.String        `json:"username,omitempty" envconfig:"K6_INFLUXDB_USERNAME"`
	Password         null.String        `json:"password,omitempty" envconfig:"K6_INFLUXDB_PASSWORD"`
	Insecure         null.Bool          `json:"insecure,omitempty" envconfig:"K6_INFLUXDB_INSECURE"`
	PayloadSize      null.Int           `json:"payloadSize,omitempty" envconfig:"K6_INFLUXDB_PAYLOAD_SIZE"`
	PushInterval     types.NullDuration `json:"pushInterval,omitempty" envconfig:"K6_INFLUXDB_PUSH_INTERVAL"`
	ConcurrentWrites null.Int           `json:"concurrentWrites,omitempty" envconfig:"K6_INFLUXDB_CONCURRENT_WRITES"`

	// Samples.
	DB           null.String `json:"db" envconfig:"K6_INFLUXDB_DB"`
	Precision    null.String `json:"precision,omitempty" envconfig:"K6_INFLUXDB_PRECISION"`
	Retention    null.String `json:"retention,omitempty" envconfig:"K6_INFLUXDB_RETENTION"`
	Consistency  null.String `json:"consistency,omitempty" envconfig:"K6_INFLUXDB_CONSISTENCY"`
	TagsAsFields []string    `json:"tagsAsFields,omitempty" envconfig:"K6_INFLUXDB_TAGS_AS_FIELDS"`
}

func NewConfig added in v0.21.0

func NewConfig() *Config

func ParseArg added in v0.21.0

func ParseArg(arg string) (Config, error)

ParseArg parses an argument string into a Config

func ParseMap added in v0.21.0

func ParseMap(m map[string]interface{}) (Config, error)

ParseMap parses a map[string]interface{} into a Config

func ParseURL added in v0.21.0

func ParseURL(text string) (Config, error)

func (Config) Apply added in v0.18.0

func (c Config) Apply(cfg Config) Config

Jump to

Keyboard shortcuts

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