Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFactory ¶ added in v0.9.0
NewFactory creates a factory for WaveFront receiver.
Types ¶
type Config ¶
type Config struct { confignet.TCPAddr `mapstructure:",squash"` // TCPIdleTimeout is the timout for idle TCP connections. TCPIdleTimeout time.Duration `mapstructure:"tcp_idle_timeout"` // ExtractCollectdTags instructs the Wavefront receiver to attempt to extract // tags in the CollectD format from the metric name. The default is false. ExtractCollectdTags bool `mapstructure:"extract_collectd_tags"` }
Config defines configuration for the Wavefront receiver.
type WavefrontParser ¶
type WavefrontParser struct {
ExtractCollectdTags bool `mapstructure:"extract_collectd_tags"`
}
WavefrontParser converts metrics in the Wavefront format, see https://docs.wavefront.com/wavefront_data_format.html#metrics-data-format-syntax, into the internal format of the Collector
func (*WavefrontParser) BuildParser ¶
func (wp *WavefrontParser) BuildParser() (protocol.Parser, error)
BuildParser creates a new Parser instance that receives Wavefront metric data.
func (*WavefrontParser) Parse ¶
func (wp *WavefrontParser) Parse(line string) (pmetric.Metric, error)
Parse receives the string with Wavefront metric data, and transforms it to the collector metric format. See https://docs.wavefront.com/wavefront_data_format.html#metrics-data-format-syntax.
Each line received represents a Wavefront metric in the following format:
"<metricName> <metricValue> [<timestamp>] source=<source> [pointTags]"
Detailed description of each element is available on the link above.