Devices
The Unified SNMP Collector makes it simple to add devices providing little more than an IP address, SNMP credentials and one or more Device Groups.
The location of the device definition files is specified by EF_INPUT_SNMP_DEVICE_DEFINITIONS_DIRECTORY_PATH
in the collectors configuration options. The default location is /etc/elastiflow/snmp/devices
.
SNMP v1/v2c Example
Full configuration:
example1.elastiflow.com:
ip: 192.0.2.1
port: 161
poll_interval: 60
timeout: 3000
retries: 2
exponential_timeout: false
version: 2c
communities:
- public
device_groups:
- cisco_c1000
When using the defaults:
example1.elastiflow.com:
ip: 192.0.2.1
version: 2c
communities:
- public
device_groups:
- cisco_c1000
SNMP v3 Example
Full configuration:
example2.elastiflow.com:
ip: 192.0.2.2
port: 161
poll_interval: 60
timeout: 3000
retries: 2
exponential_timeout: false
version: 3
v3_credentials:
- username: elastiflow
authentication_protocol: sha
authentication_passphrase: efauthpassword
privacy_protocol: des
privacy_passphrase: efprivpassword
device_groups:
- cisco_c1000
When using the defaults:
example2.elastiflow.com:
ip: 192.0.2.2
version: 3
v3_credentials:
- username: elastiflow
authentication_protocol: sha
authentication_passphrase: efauthpassword
privacy_protocol: des
privacy_passphrase: efprivpassword
device_groups:
- cisco_c1000
Global Device Defaults
The location of the global default device definition file is specified by EF_INPUT_SNMP_DEFAULTS_DIRECTORY_PATH
in the collectors configuration options. The file in this directory must be named device.yml
. The default location is /etc/elastiflow/snmp/defaults
.
This file will apply default values to every device definition where values are not provided (except the ip
field).
Device Defaults Example
Defaults file:
default:
port: 200
timeout: 4000
retries: 4
exponential_timeout: true
version: 2c
communities:
- sith
- lord
device_groups:
- generic
poll_interval: 90
max_oids: 64
Device file:
mydevice:
ip: 192.0.2.1
Resulting definition:
mydevice:
ip: 192.0.2.1
port: 200
timeout: 4000
retries: 4
exponential_timeout: true
version: 2c
communities:
- sith
- lord
device_groups:
- generic
poll_interval: 90
max_oids: 64
Configuration Attributes
ip
The IP address of the device to which SNMP requests will be sent.
EXAMPLE: ip: 192.0.2.2
port (optional)
The UDP port on which the device listens for SNMP requests.
- Default
161
poll_interval (optional)
The interval, in seconds, between collection of attributes applicable to the device.
- Default
60
Currently only device-level polling intervals are supported. A future enhancement will include support for object-level interval override of the device-level value.
timeout (optional)
The time to wait, in milliseconds, for a response to an SNMP request.
- Default
3000
retries (optional)
The number of times to retry a failed SNMP request before the task is cancelled.
- Default
2
exponential_timeout (optional)
Defines whether the timeout interval should remain static (false
) for each retry, or increase exponentially (true
).
- Default
false
version
Specifies the SNMP version to use when polling this device. Valid values are:
- Valid Values
1
,2c
,3
communities
If version
is 1
or 2c
a list of communities must be provided. The collector will attempt to find a valid community from the list and will use that community for all subsequent polls.
EXAMPLE:
communities:
- public
- elastiflow
v3_credentials
If version
is 3
a list of SNMPv3 credentials must be provided. The collector will attempt to find valid credentials from the list and will use those credentials for all subsequent polls.
EXAMPLE:
v3_credentials:
- username: elastiflow
authentication_protocol: sha
authentication_passphrase: efauthpassword
privacy_protocol: des
privacy_passphrase: efprivpassword
username
The username used to authenticate with the device using SNMPv3.
authentication_protocol
The authentication protocol used to authenticate the username with the device using SNMPv3.
authentication_passphrase
The authentication passphrase used to authenticate the username with the device using SNMPv3.
privacy_protocol
The privacy protocol used to encrypt SNMPv3 traffic between the SNMP input and the device.
privacy_passphrase
The privacy passphrase used to encrypt SNMPv3 traffic between the SNMP input and the device.
device_groups
Defines a list of Device Groups which the Device may implement.