package
1.33.2
Repository: https://github.com/influxdata/telegraf.git
Documentation: pkg.go.dev

# Packages

# Functions

DefaultSampleConfig returns the sample config with the default parameters uncommented to also be able to test the validity of default setting.
GetLocalHost returns the DOCKER_HOST environment variable, parsing out any scheme or ports so that only the IP address is returned.
IgnoreFields disables comparison of the fields with the given names.
IgnoreTags disables comparison of the tags with the given names.
IgnoreTime disables comparison of timestamp.
MetricEqual returns true if the metrics are equal.
MockMetrics returns a mock []telegraf.Metric object for using in unit tests of telegraf output sinks.
MustMetric creates a new metric.
OnlyTags returns an option for keeping only "Tags" for a given Metric.
ParseLinesFromFile returns the lines of the file as strings.
ParseMetricsFrom parses metrics from the given lines in line-protocol following a header, with a trailing blank line.
ParseMetricsFromFile parses metrics from the given file in line-protocol.
ParseRawLinesFrom returns the raw lines between the given header and a trailing blank line.
RequireMetricEqual halts the test with an error if the metrics are not equal.
RequireMetricsEqual halts the test with an error if the array of metrics are not equal.
RequireMetricsStructureEqual halts the test with an error if the array of metrics is structural different.
RequireMetricsStructureSubset halts the test with an error if the expected array of metrics is not a subset of the actual metrics.
RequireMetricsSubset halts the test with an error if the expected array of metrics is not a subset of the actual metrics.
SortMetrics enables sorting metrics before comparison.
TestMetric Returns a simple test point: measurement -> "test1" or name tags -> "tag1":"value1" value -> value time -> time.Date(2009, time.November, 10, 23, 0, 0, 0, time.UTC).

# Constants

# Structs

Accumulator defines a mocked out accumulator.
CaptureLogger defines a logging structure for plugins.
Entry
Metric defines a single point measurement.
NopAccumulator is used for benchmarking to isolate the plugin from the internal telegraf accumulator machinery.

# Interfaces