Documentation ¶
Index ¶
- func MakeBatchConfig(conf Config) client.BatchPointsConfig
- func MakeClient(conf Config) (client.Client, error)
- type Collector
- func (c *Collector) Collect(scs []stats.SampleContainer)
- func (c *Collector) Format(samples []stats.Sample) ([]string, error)
- func (c *Collector) GetRequiredSystemTags() lib.TagSet
- func (c *Collector) Init() error
- func (c *Collector) Link() string
- func (c *Collector) Run(ctx context.Context)
- func (c *Collector) SetRunStatus(status lib.RunStatus)
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeBatchConfig ¶ added in v0.18.0
func MakeBatchConfig(conf Config) client.BatchPointsConfig
Types ¶
type Collector ¶
type Collector struct { Client client.Client Config Config BatchConf client.BatchPointsConfig // contains filtered or unexported fields }
func (*Collector) Collect ¶
func (c *Collector) Collect(scs []stats.SampleContainer)
func (*Collector) Format ¶ added in v0.21.0
Format returns a string array of metrics in influx line-protocol
func (*Collector) GetRequiredSystemTags ¶ added in v0.20.0
GetRequiredSystemTags returns which sample tags are needed by this collector
func (*Collector) SetRunStatus ¶ added in v0.21.1
SetRunStatus does nothing in the InfluxDB collector
type Config ¶ added in v0.16.0
type Config struct { // Connection. Addr null.String `json:"addr" envconfig:"INFLUXDB_ADDR"` Username null.String `json:"username,omitempty" envconfig:"INFLUXDB_USERNAME"` Password null.String `json:"password,omitempty" envconfig:"INFLUXDB_PASSWORD"` Insecure null.Bool `json:"insecure,omitempty" envconfig:"INFLUXDB_INSECURE"` PayloadSize null.Int `json:"payloadSize,omitempty" envconfig:"INFLUXDB_PAYLOAD_SIZE"` // Samples. DB null.String `json:"db" envconfig:"INFLUXDB_DB"` Precision null.String `json:"precision,omitempty" envconfig:"INFLUXDB_PRECISION"` Retention null.String `json:"retention,omitempty" envconfig:"INFLUXDB_RETENTION"` Consistency null.String `json:"consistency,omitempty" envconfig:"INFLUXDB_CONSISTENCY"` TagsAsFields []string `json:"tagsAsFields,omitempty" envconfig:"INFLUXDB_TAGS_AS_FIELDS"` }
Click to show internal directories.
Click to hide internal directories.