SNMP Configuration and Queries¶
This topic covers configurations for various versions.
SNMP Configuration¶
SNMP must be configured under the SNMP menu and the SNMP URI needs to be configured for all the notify severity levels(info|warn|error]).
Note
If special characters are used in the SNMP URI, these should be URL encoded.
SNMP URI usage:
snmpv2: snmp://community@host[:port]
snmpv3: snmp://user:auth:password]@host[:port] … minimum auth/password length is 8 characters.
For example:
snmpv2: notify add info snmp://public@1.2.3.4
snmpv3: notify add error snmp://public:publicauth:password@1.2.3.4
The following options can be configured under the SNMP menu in the CLI.
Enabled -Enable or disable SNMP Queries
Community- SNMP v2c Community String used to query this server
Authorized Username - SNMP v3 Username to query this server
Password - SNMP v3 Password to query this server
Query - IP address that is allowed to query this server
Sysname - Name of this server, as it will appear when queried via SNMP
Syslocation - Location of this server
Syscontact - Contact person(s) for this server (email address)
Load1 - 1 Minute load average alarm value
Load5 - 5 Minute load average alarm value
Load15 - 15 Minute load average alarm value
The following options can be configured in the CLI:
Hostname - Server name to send SNMP traps to.
Version - Version of SNMP to use for sending trap, version 2c or 3.
Community - refer to the SNMP-URI command usage.
SNMP Queries¶
The VOSS Automate server permits multiple remote query sources to perform SNMP queries against.
The following commands are available to set SNMP details:
snmp contact <system contact>
snmp name <system name>
snmp location <system location>
SNMP query sources can be added with
snmp query add <uri>
SNMP v2 can be set with:
snmp query add snmp://<community string>@<ip>
SNMP v3 username and password can be set with:
snmp query add snmp://user:auth:password@<ip>:<port>
Where:
user
: the username for the SNMPv3 serverauth
: the SNMPv3 authKey, with a minimum length of 8 characters (SHA authentication)password
: the SNMPv3 privKey, with a minimum length of 8 characters (AES encryption)To see the list of added query sources, run snmp query list.
To remove a query source, run snmp query del <uri>.
The screen console output below are example of the use of add, list, and del parameters with SNMPv2:
platform@host:~$ snmp query add snmp://[email protected]
You are about to restart the SNMP service. Do you wish to continue? y
Please update notify to reflect your latest changes.
You have new mail in /var/mail/platform
platform@host:~$
platform@host:~$ snmp list
load1: 4
load15: 1
load5: 2
query:
snmp://[email protected]
snmp://[email protected]
syscontact: Robert Frame
syslocation: Dublin
sysname: host
platform@host:~$ snmp query del snmp://[email protected]
You are about to restart the SNMP service. Do you wish to continue? y
Application services:firewall processes stopped.
Application snmp processes stopped.
Application snmp processes started.
Please update notify to reflect your latest changes.
You have new mail in /var/mail/platform
platform@host:~$
SNMP CPU load notifications are set using:
snmp load <1min load> <5min load> <15min load>
This results in notifications being sent should the threshold be exceeded. For a server with 2 CPUs, it is recommended that this setting be:
snmp load 8 4 2
This means that notifications are sent if the 2-CPU system load averages over the last 1, 5, and 15 minutes reach these values.