Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrintInputConfig ¶
PrintInputConfig prints the config usage of a single input.
func PrintOutputConfig ¶
PrintOutputConfig prints the config usage of a single output.
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 // By default or when set to "0s", precision will be set to the same // timestamp order as the collection interval, with the maximum being 1s. // ie, when interval = "10s", precision will be "1s" // when interval = "250ms", precision will be "1ms" // Precision will NOT be used for service inputs. It is up to each individual // service input to set the timestamp at the appropriate precision. Precision internal.Duration // CollectionJitter is used to jitter the collection by a random amount. // Each plugin will sleep for a random time within jitter before collecting. // This can be used to avoid many plugins querying things like sysfs at the // same time, which can have a measurable effect on the system. CollectionJitter internal.Duration // FlushInterval is the Interval at which to flush data FlushInterval internal.Duration // FlushJitter Jitters the flush interval by a random amount. // This is primarily to avoid large write spikes for users running a large // number of telegraf instances. // ie, a jitter of 5s and interval 10s means flushes will happen every 10-15s FlushJitter internal.Duration // MetricBatchSize is the maximum number of metrics that is wrote to an // output plugin in one call. MetricBatchSize int // MetricBufferLimit is the max number of metrics that each output plugin // will cache. The buffer is cleared when a successful write occurs. When // full, the oldest metrics will be overwritten. This number should be a // multiple of MetricBatchSize. Due to current implementation, this could // not be less than 2 times MetricBatchSize. MetricBufferLimit int // FlushBufferWhenFull tells Telegraf to flush the metric buffer whenever // it fills up, regardless of FlushInterval. Setting this option to true // does _not_ deactivate FlushInterval. FlushBufferWhenFull bool // TODO(cam): Remove UTC and parameter, they are no longer // valid for the agent config. Leaving them here for now for backwards- // compatibility UTC bool `toml:"utc"` // Debug is the option for running in debug mode Debug bool // Logfile specifies the file to send logs to Logfile string // Quiet is the option for running in quiet mode Quiet bool Hostname string OmitHostname bool }
type Config ¶
type Config struct { Tags map[string]string InputFilters []string OutputFilters []string Agent *AgentConfig Inputs []*models.RunningInput Outputs []*models.RunningOutput Aggregators []*models.RunningAggregator // Processors have a slice wrapper type because they need to be sorted Processors models.RunningProcessors }
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 ¶
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 outputs.
Click to show internal directories.
Click to hide internal directories.