Documentation ¶
Overview ¶
Package config exposes the netflow configuration as a component.
Package config defines the configuration options for the netflow services.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ListenerConfig ¶
type ListenerConfig struct { FlowType common.FlowType `mapstructure:"flow_type"` Port uint16 `mapstructure:"port"` BindHost string `mapstructure:"bind_host"` Workers int `mapstructure:"workers"` Namespace string `mapstructure:"namespace"` Mapping []Mapping `mapstructure:"mapping"` }
ListenerConfig contains configuration for a single flow listener
func (*ListenerConfig) Addr ¶
func (c *ListenerConfig) Addr() string
Addr returns the host:port address to listen on.
type Mapping ¶
type Mapping struct { Field uint16 `mapstructure:"field"` Destination string `mapstructure:"destination"` Endian common.EndianType `mapstructure:"endianness"` Type common.FieldType `mapstructure:"type"` }
Mapping contains configuration for a Netflow/IPFIX field mapping
type NetflowConfig ¶
type NetflowConfig struct { Enabled bool `mapstructure:"enabled"` Listeners []ListenerConfig `mapstructure:"listeners"` StopTimeout int `mapstructure:"stop_timeout"` AggregatorBufferSize int `mapstructure:"aggregator_buffer_size"` AggregatorFlushInterval int `mapstructure:"aggregator_flush_interval"` AggregatorFlowContextTTL int `mapstructure:"aggregator_flow_context_ttl"` AggregatorPortRollupThreshold int `mapstructure:"aggregator_port_rollup_threshold"` AggregatorPortRollupDisabled bool `mapstructure:"aggregator_port_rollup_disabled"` // AggregatorRollupTrackerRefreshInterval is useful to speed up testing to avoid wait for 1h default AggregatorRollupTrackerRefreshInterval uint `mapstructure:"aggregator_rollup_tracker_refresh_interval"` PrometheusListenerAddress string `mapstructure:"prometheus_listener_address"` // Example `localhost:9090` PrometheusListenerEnabled bool `mapstructure:"prometheus_listener_enabled"` ReverseDNSEnrichmentEnabled bool `mapstructure:"reverse_dns_enrichment_enabled"` }
NetflowConfig contains configuration for NetFlow collector.
func ReadConfig ¶
ReadConfig builds and returns configuration from Agent configuration.
func (*NetflowConfig) SetDefaults ¶
func (mainConfig *NetflowConfig) SetDefaults(namespace string, logger log.Component) error
SetDefaults sets default values wherever possible, returning an error if any values are malformed.
Click to show internal directories.
Click to hide internal directories.