Enabling SNMP alerts
About this task
Enable and configure SNMP alerts in the config_location/event-plugins/snmp.conf file.
Multiple instances of the snmp.conf
file results in multiple instances of an event plugin.
The SNMP configuration file can have any name provided the file has the .conf file extension, contains the valid event plugin identifier [snmp]
, and resides in the event-plugins directory location.
All configuration files are loaded, so differentiate the file names such as snmp1.conf, snmp2.conf, and so on.
Multiple plugin instances facilitate flexibility when setting up alerts to SNMP targets for development and production clusters.
All OpsCenter event plugins support multiple configurations files and subsequent plugin instances.
Prerequisites
Import the OpsCenter MIB (DATASTAX-OPSCALERT-MIB.txt) located in the event-plugins directory into the infrastructure monitoring application of choice, such as a Nagios application. The MIB is a formal specification of the fields within OpsCenter traps. Installing the MIB is mandatory for using the SNMP traps effectively; without doing so, the field titles will not render properly. Refer to the installation and configuration instructions provided by the application vendor.
Procedure
-
In a terminal, open snmp.conf for editing.
-
Enable the SNMP plugin for sending traps.
[snmp] enabled=1
-
Optional: The engine ID that uniquely identifies the SNMP engine is commented out by default. By default, if the
engine_id
is unset, OpsCenter creates a local engine ID based on the local IP address. If you prefer to manually set theengine_id
, uncomment theengine_id
. Change the last four octets (01:02:03:04
) of theengine_id
string to a unique octet string for each OpsCenter installation.[snmp] ... engine_id=80:00:00:00:05:50:60:70:80
-
For the
target_ip
, enter the IPv4 address of the SNMP receiver. -
If you do not want to accept the remaining default configuration values, consult the following table for assistance with completing the fields relevant to each of your OpsCenter installations:
SNMP configuration fields SNMP configuration options Description enabled
Enables (1) or disables (0) the SNMP plugin instance. Default: 0 (disabled).
levels
Comma-delimited list of event severities for which the SNMP plugin should fire. If not specified, all levels are listened for by default. Available options: DEBUG INFO WARN ERROR CRITICAL ALERT
clusters
Comma-delimited list of cluster names for which the plugin should fire. If no cluster is specified, the alert is called for events on all clusters by default.
engine_id
SNMP engine ID that uniquely identifies the SNMP engine. The last four octets of the ID (01:02:03:04 by default) must be unique between multiple OpsCenter installations. Default: 80:00:00:00:05:01:02:03:04 for the Octets default format scheme. SNMP version is not relevant to this setting. For more details on SNMP management, see RFC3411.
Format Schemes
The fifth octet in the
engine_id
determines the format scheme that specifies the nature of the remaining trailing octets. Available format schemes:01
: IPv4 Address scheme02
: IPv6 Address scheme03
: MAC Address scheme04
: Text Address scheme **05
: Octets scheme (default)target_ip
IPv4 address of the SNMP trap target. Default: 127.0.0.1
Only IPv4 is supported at this time.
target_port
Listening port on the SNMP manager to receive SNMP traps. Default: 162.
use_snmpv3
When set to 1, this SNMP plugin instance will use the SNMPv3 configuration options (
username
,auth_protocol
,auth_key
,privacy_protocol
,privacy_key
) with SNMP authentication. When set to 0, this SNMP plugin instance will use thecommunity_name
with SNMPv1/2c authentication. Default: 0 (uses SNMPv1/2c).community_name
SNMPv1/2c-specific configuration. Community name for authentication with the SNMP trap target. Default:
public
.user
Username for SNMPv3 authentication. Default:
opscusername
.auth_protocol
SNMPv3 authentication hashing algorithm. Specifies the authentication protocol to use with SNMPv3. Available options:
SHA
(default)MD5
**NoAuth
auth_key
SNMPv3 authentication key. Authentication key as configured for your OpsCenter installation in your monitoring software. Default:
auth1key
.privacy_protocol
SNMPv3 privacy protocol. Available standards-compliant options:
AES
(default)DES
NoPriv
Available Extended Security Options (ESO) from the SNMP Research Group:3DES
AES192
AES256
privacy_key
Privacy key as configured for your OpsCenter install in your monitoring software. Default:
privkey1
.