DiskSuite can send SNMP trap data (alerts) to any network management console capable of receiving SNMP messages. This is accomplished through a separate DiskSuite daemon, mdlogd, that you choose to install. Through a configuration file, you specify the trap variables as well as the kinds of messages to look for.
To use the DiskSuite SNMP daemon, you must install the optional SUNWmdnr and SUNWmdnupackages. See Solstice DiskSuite 4.2.1 Installation and Product Notes.
This task assumes you have installed the DiskSuite SNMP packages, SUNWmdnr and SUNWmdnu.
The steps to configure DiskSuite for SNMP support are:
Configure the mdlogd SNMP daemon
Edit the /etc/lvm/mdlogd.cf SNMP trap configuration file
For more information, refer to the mdlogd(4) man page.
When you reboot the system after installing the SUNWmdnr and SUNWmdnu packages, the following message appears:
Starting mdlogd ... /etc/lvm/mdlogd.cf: no configuration information
(A postinstall script should have taken care of this when you added the package.)
Edit and save the SNMP trap configuration file, mdlogd.cf.
Change the line ENTERPRISE = to the SNMP identifier for the enterprise to which the host running the daemon belongs.
Change the line OBJECTID = to the SNMP identifier of the host running the daemon.
Configure the SubStrings the daemon will look for. These are messages generated by DiskSuite.
Change the trap destination tuple to the name of the host to receive the SNMP trap; the port; and the protocol.
Most likely you will always use port 162 and protocol udp, as these are the defaults for SNMP traps.
Leave the Generic SNMP Trap # set to 6.
You can use your own coding scheme for Specific Trap #.
For example, use number 1 for a low priority message, number 2 for medium priority, and 3 for high priority.
##ident "@(#)mdlogd.cf 1.1 96/02/15" # DiskSuite SNMP Trap configuration file. ... ENTERPRISE = 126.96.36.199.4.1.42 OBJECTID = 188.8.131.52.4.1.860 # # SubString Trap Destination SNMP Trap # Specific Trap # # (host:port:protocol) 0 < n <= 6 0 < n "NOTICE: md:" "spin:162:udp" 6 1 "WARNING: md:" "spin:162:udp" 6 2
This example dispatches SNMP traps for DiskSuite errors written to /dev/console to a host named spin.
Here's what the trap generated by the error message "WARNING: md: d6: /dev/dsk/c3t3d0s7 needs maintenance" would look like when received by a SunNet Manager console:
Wed Feb 21 15:40:41 1996 [ spin ] : Trap: sequence=2 receive-time=Wed Feb 21 15:40:41 1996 version=0 community=public enterprise=Sun Microsystems source-time=00:00:00.00 trap-type=enterprise specific trap: 2 184.108.40.206.4.1.860 = Feb 21 15:40:41 1996 spin WARNING: md: d6: /dev/dsk/c3t3d0s7 needs maintenance