Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrintInputConfig ¶ added in v0.10.0
PrintInputConfig prints the config usage of a single input.
func PrintOutputConfig ¶
PrintOutputConfig prints the config usage of a single output.
func PrintSampleConfig ¶
PrintSampleConfig prints the sample config
Types ¶
type AgentConfig ¶
type AgentConfig struct {
// Interval at which to gather information
Interval internal.Duration
// RoundInterval rounds collection interval to 'interval'.
// ie, if Interval=10s then always collect on :00, :10, :20, etc.
RoundInterval bool
// Interval at which to flush data
FlushInterval internal.Duration
// FlushRetries is the number of times to retry each data flush
FlushRetries int
// FlushJitter tells
FlushJitter internal.Duration
// TODO(cam): Remove UTC and Precision parameters, they are no longer
// valid for the agent config. Leaving them here for now for backwards-
// compatability
UTC bool `toml:"utc"`
Precision string
// Option for running in debug mode
Debug bool
Hostname string
}
type Config ¶
type Config struct {
Tags map[string]string
InputFilters []string
OutputFilters []string
Agent *AgentConfig
Inputs []*RunningInput
Outputs []*RunningOutput
}
Config specifies the URL/user/password for the database that telegraf will be logging to, as well as all the plugins that the user has specified
func (*Config) InputNames ¶ added in v0.10.0
Inputs returns a list of strings of the configured inputs.
func (*Config) ListTags ¶
ListTags returns a string of tags specified in the config, line-protocol style
func (*Config) LoadConfig ¶
LoadConfig loads the given config file and applies it to c
func (*Config) LoadDirectory ¶
func (*Config) OutputNames ¶
Outputs returns a list of strings of the configured inputs.
type Filter ¶ added in v0.2.4
type Filter struct {
Drop []string
Pass []string
TagDrop []TagFilter
TagPass []TagFilter
IsActive bool
}
Filter containing drop/pass and tagdrop/tagpass rules
func (Filter) ShouldPass ¶ added in v0.2.4
ShouldPass returns true if the metric should pass, false if should drop based on the drop/pass filter parameters
type InputConfig ¶ added in v0.10.0
type InputConfig struct {
Name string
NameOverride string
MeasurementPrefix string
MeasurementSuffix string
Tags map[string]string
Filter Filter
Interval time.Duration
}
InputConfig containing a name, interval, and filter
type OutputConfig ¶ added in v0.2.4
OutputConfig containing name and filter
type RunningInput ¶ added in v0.10.0
type RunningInput struct {
Name string
Input inputs.Input
Config *InputConfig
}
type RunningOutput ¶
type RunningOutput struct {
Name string
Output outputs.Output
Config *OutputConfig
}
func (*RunningOutput) FilterPoints ¶ added in v0.2.4
func (ro *RunningOutput) FilterPoints(points []*client.Point) []*client.Point
Filter returns filtered slice of client.Points based on whether filters are active for this RunningOutput.