Documentation ¶
Index ¶
Constants ¶
View Source
const ( URL = "https://datadis.es" HOURLY measurementType = iota QuarterHourly )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Consumption ¶
type Datadis ¶
type Datadis struct { HTTPTimeout config.Duration `toml:"http_timeout"` MeasurementType measurementType `toml:"measurement_type"` Username string `toml:"username"` Password string `toml:"password"` Supplies []Supply `toml:"supplies"` StartDate string `toml:"start_date"` EndDate string `toml:"end_date"` DateDuration config.Duration `toml:"date_duration"` Log telegraf.Logger `toml:"-"` // contains filtered or unexported fields }
Datadis contains the configuration for the pluguin.
func (*Datadis) Description ¶
Description returns a one-sentence description on the Datadis input plugin.
func (*Datadis) Gather ¶
func (d *Datadis) Gather(acc telegraf.Accumulator) error
Gather takes in an accumulator and adds the metrics that the Input gathers. This is called every "interval".
func (*Datadis) SampleConfig ¶
SampleConfig returns the default configuration of the Datadis input plugin.
type Supply ¶
type Supply struct { Address string `json:"address"` Cups string `json:"cups" toml:"cups"` PostalCode string `json:"postalCode"` Province string `json:"province"` Municipality string `json:"municipality"` Distributor string `json:"distributor"` ValidDateFrom string `json:"validDateFrom"` ValidDateTo string `json:"validDateTo"` PointType uint8 `json:"pointType" toml:"point_type"` DistributorCode string `json:"distributorCode" toml:"distributor_code"` }
Click to show internal directories.
Click to hide internal directories.