The SNMP event forwarding feature is included as part of the LifeKeeper Core functionality and does not require additional LifeKeeper packages to be installed. Since LifeKeeper uses the snmptrap utility to generate the traps, the snmptrap command is required to be installed on the node that will generate SNMP notification.
The snmptrap utility is provided by the following packages:
RHEL 5 or later and supported operating systems – net-snmp-utils
SLES 11 or later – net-snmp
In older versions of the snmp implementation (prior to 4.1) where the defCommunity directive is not supported, the traps will be sent using the “public” community string.
It is not necessary to have an SNMP agent snmpd running on the LifeKeeper node.
The configuration of a trap handler on the network management console and its response to trap messages is beyond the scope of this LifeKeeper feature. See the documentation associated with your system management tool for related instructions.
The following tasks must be performed to set up LifeKeeper SNMP Event Forwarding. All but the last task must be repeated on each node in the LifeKeeper cluster that will be generating SNMP trap messages.
- Ensure that the snmptrap utility is available as noted above.
- Specify the network management node to which the SNMP traps will be sent. This can be done either by command line or by editing the /etc/default/LifeKeeper file. You must specify the IP address rather than domain name to avoid DNS issues.
- By command line, use the lk_configsnmp (see the
lk_configsnmp(1m) man page for details). This utility will only accept IP addresses.
- Or, edit the defaults file /etc/default/LifeKeeper to add the IP address. Find the entry LK_TRAP_MGR= and insert one or more IP addresses (separated by commas) to the right of “=” (no white space before or after “=” or commas).
- If you are using an older version of the snmp implementation that does not support the defCommunity directive, skip this step. Traps will be sent using the “public” community string. Otherwise, do the following:
Specify a default community in /usr/share/snmp/snmp.conf. If this file does not exist, create it using sufficiently secure permissions. Add the directive “defCommunity“ with a value. This specifies the SNMP version 2c community string to use when sending traps. For example, add a line like this:
Refer to the snmp.conf man page (delivered with the snmp package) for more information about this configuration file.
- Perform whatever configuration steps are needed on the remote management console to detect and respond to the incoming trap OIDs from LifeKeeper events. If the management node is a Linux server, the minimum that you would need to do to begin verification of this feature would be to start the snmptrapd daemon with the -f -Lo option (print the messages to stdout).
Verifying the Configuration
To verify that the configuration is working, initiate a LifeKeeper action (for example, start or stop LifeKeeper, or bring a resource in-service manually using the LifeKeeper GUI). Verify that the trap message was received at the management console. If a trap is not received, inspect the appropriate log files on the management system, and follow the normal troubleshooting practices provided with the management software. The LifeKeeper log can be inspected to determine if there was a problem sending the trap message. See SNMP Troubleshooting for more information.
Disabling SNMP Event Forwarding
To disable the generation of SNMP traps by LifeKeeper, simply remove the assignment of an IP address from the LK_TRAP_MGR environment variable in the file /etc/default/LifeKeeper. This can be accomplished using the lk_configsnmp utility from the command line with the “disable“option (see the lk_configsnmp(1M) page for an example). Or, edit /etc/default/LifeKeeper and change the entry for LK_TRAP_MGR to LK_TRAP_MGR= (or remove the line entirely). This must be done on each node that should be disabled from sending trap messages.