Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentConfig ¶
type AgentConfig struct { // Number of threads to be used by the agent process. // Should be in the range of [1, runtime.NumCPU()). ThreadCount int `mapstructure:"thread_count"` // Interval at which to gather information. Interval time.Duration `mapstructure:"interval"` // 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 time.Duration `mapstructure:"collection_jitter"` // Default flushing interval for all sinks. You shouldn't set this below // interval. Maximum flush_interval will be flush_interval + flush_jitter. FlushInterval time.Duration `mapstructure:"flush_interval"` // FlushJitter Jitters the flush interval by a random amount. // This is primarily to avoid large write spikes for users running a large // number of Optic instances. // ie, a jitter of 5s and interval 10s means flushes will happen every 10-15s FlushJitter time.Duration `mapstructure:"flush_jitter"` // Override default hostname, if empty use os.Hostname(). Hostname string `mapstructure:"hostname"` // If set to true, do no set the "host" tag in the Optic agent. OmitHostname bool `mapstructure:"omit_hostname"` }
type Config ¶
type Config struct { Tags map[string]string `mapstructure:"global_tags"` Agent *AgentConfig `mapstructure:"agent"` Sources map[string]*models.RunningSource `mapstructure:"-"` Processors map[string]*models.RunningProcessor `mapstructure:"-"` Sinks map[string]*models.RunningSink `mapstructure:"-"` }
Config provides a container with configuration parameters for Optic
func (*Config) GlobalTags ¶
GlobalTags returns a string of tags specified in the config.
func (*Config) LoadConfig ¶
LoadConfig loads the given config file and applies it to c.
func (*Config) ProcessorNames ¶
ProcessorNames returns a list of strings of the configured processors.
func (*Config) SourceNames ¶
SourceNames returns a list of strings of the configured sources.
Click to show internal directories.
Click to hide internal directories.