Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Network string `mapstructure:"network_address"` Port uint16 `mapstructure:"port"` Version string `mapstructure:"snmp_version"` Timeout int `mapstructure:"timeout"` Retries int `mapstructure:"retries"` OidBatchSize int `mapstructure:"oid_batch_size"` Community string `mapstructure:"community_string"` User string `mapstructure:"user"` AuthKey string `mapstructure:"authKey"` AuthProtocol string `mapstructure:"authProtocol"` PrivKey string `mapstructure:"privKey"` PrivProtocol string `mapstructure:"privProtocol"` ContextEngineID string `mapstructure:"context_engine_id"` ContextName string `mapstructure:"context_name"` IgnoredIPAddresses map[string]bool `mapstructure:"ignored_ip_addresses"` ADIdentifier string `mapstructure:"ad_identifier"` Loader string `mapstructure:"loader"` CollectDeviceMetadataConfig *bool `mapstructure:"collect_device_metadata"` CollectDeviceMetadata bool UseDeviceIDAsHostnameConfig *bool `mapstructure:"use_device_id_as_hostname"` UseDeviceIDAsHostname bool Namespace string `mapstructure:"namespace"` Tags []string `mapstructure:"tags"` MinCollectionInterval uint `mapstructure:"min_collection_interval"` // Legacy NetworkLegacy string `mapstructure:"network"` VersionLegacy string `mapstructure:"version"` CommunityLegacy string `mapstructure:"community"` AuthKeyLegacy string `mapstructure:"authentication_key"` AuthProtocolLegacy string `mapstructure:"authentication_protocol"` PrivKeyLegacy string `mapstructure:"privacy_key"` PrivProtocolLegacy string `mapstructure:"privacy_protocol"` }
Config holds configuration for a particular subnet
func (*Config) BuildSNMPParams ¶
BuildSNMPParams returns a valid GoSNMP struct to start making queries
type ListenerConfig ¶
type ListenerConfig struct { Workers int `mapstructure:"workers"` DiscoveryInterval int `mapstructure:"discovery_interval"` AllowedFailures int `mapstructure:"discovery_allowed_failures"` Loader string `mapstructure:"loader"` CollectDeviceMetadata bool `mapstructure:"collect_device_metadata"` MinCollectionInterval uint `mapstructure:"min_collection_interval"` Namespace string `mapstructure:"namespace"` UseDeviceISAsHostname bool `mapstructure:"use_device_id_as_hostname"` Configs []Config `mapstructure:"configs"` // legacy AllowedFailuresLegacy int `mapstructure:"allowed_failures"` }
ListenerConfig holds global configuration for SNMP discovery
func NewListenerConfig ¶
func NewListenerConfig() (ListenerConfig, error)
NewListenerConfig parses configuration and returns a built ListenerConfig
Click to show internal directories.
Click to hide internal directories.