Adding a Destination for Notifications on Solaris SPARC

 

This procedure describes how to set a new destination for notifications on a Solaris SPARC system in addition to other destinations that are configured.

Important! In some instances, output from SNMP tools refers to notifications as traps.

 

To deliver notifications to the correct destination, you need to know whether your destination uses SNMPv1 or SNMPv2c. If you do not know which version you are using (v1 or v2), find out before you change the destination of the notifications. If you do not set the destination on a line of the file containing the correct version of SNMP, you will receive no notifications.

Adding a New Destination for Notifications on Solaris SPARC

To add a new destination for notifications, do the following:

1 Stop the SNMP Master Agent by typing the following at the command line:

# ps -ef | grep snmpdm

A message is displayed indicating the process number of the snmpdm. To kill that process, type the following:

# kill -9 <process number>

2 Using a text editor, open the /etc/srconf/agt/snmpd.cnf file.

3 To add a new destination for notifications, copy and edit lines in the snmpTargetAddrEntry and the snmpNotifyEntry objects in this file.

4 Search for snmpTargetAddrEntry. The entry will look similar to the following:

#Entry type: snmpTargetAddrEntry

#Format: snmpTargetAddrName (text)

# snmpTargetAddrTDomain (snmpUDPDomain, snmpIPX
Domain, etc.)

# snmpTargetAddrTAddress (transport address,
i.e. 192.147.142.254:0)

# snmpTargetAddrTimeout (integer)

# snmpTargetAddrRetryCount (integer)

# snmpTargetAddrTagList (text)

# snmpTargetAddrParams (text)

# snmpTargetAddrStorageType (nonVolatile,
permanent, readOnly)

# tgtAddressMask (transport mask,
i.e. 255.255.255.255:0)

snmpTargetAddrEntry 31 snmpUDPDomain 127.0.0.1:0 100 3 localhost_v1 v1ExampleParams nonVolatile 255.255.255.255:0

snmpTargetAddrEntry 32 snmpUDPDomain 127.0.0.1:0 100 3 localhost_v2 v2cExampleParams nonVolatile 255.255.255.255:0

The first 10 lines of the entry (all lines beginning with pound (#) signs), describe the format of the snmpTargetAddrEntry fields. They are informational only.

The last four lines of the file are the lines that you actually copy and edit. If your destination uses SNMP v1 protocol, copy and edit the following lines:

snmpTargetAddrEntry 31 snmpUDPDomain 127.0.0.1:0 100 3 localhost_v1 v1ExampleParams nonVolative 255.255.255.255:0

Note the destination: localhost_v1.

If your destination uses SNMP v2 protocol, copy and edit the following lines:

snmpTargetAddrEntry 32 snmpUDPDomain 127.0.0.1:0 100 3 localhost_v2 v2cExampleParams nonVolative 255.255.255.255:0

Note the destination: localhost_v2.

5 Copy the lines associated with SNMP v1 or v2 and paste them at the bottom of the snmpTargetAddrEntry.

6 Increment the snmpTargetAddrName, the second field in the line, to 33 (or to the next number in sequence).

7 Modify the IP address of the line to the new destination IP address. The IP address of the destination is the snmpTargetAddrTAddress field. It is the fourth field in the line. The IP address must be followed by :0. For example, an IP address might be 192.143.43.22:0.

8 Modify the snmpTargetAddrTagList, the seventh field in the line, to the name of the new target destination. The name must be unique. Use underscores for spaces in the name. The name must be followed by _v1 or _v2 depending on the SNMP protocol you are using.

For example, the new name might be: Boston_v2.

9 The entry above the snmpTargetAddrEntry is the snmpNotifyEntry. Search for snmpNotifyEntry in the file. It should look similar to the following:

#Entry type: snmpNotifyEntry

#Format: snmpNotifyName (text)

# snmpNotifyTag (text)

# snmpNotifyType (trap(1), inform(2))

# snmpNotifyStorageType (nonVolatile, permanent, readOnly)

snmpNotifyEntry 31 localhost_v1 trap nonVolatile

snmpNotifyEntry 32 localhost_v2 trap nonVolatile

The last two lines of this entry are the lines that you copy and edit when you add a new destination for notifications. As above, if your destination uses SNMP v1, copy and edit the following line:

snmpNotifyEntry 31 localhost_v1 trap nonVolatile

If your destination uses SNMP v2, copy and edit the following line:

snmpNotifyEntry 32 localhost_v2 trap nonVolatile

10 Copy the line associated with either SNMP v1 or v2 and paste it to the bottom of the snmpNotifyEntry.

11 Increment the snmpNotifyName, the second field in the line, to 33 (or to the next number in sequence).

12 Modify the snmpNotifyTag, the third field in the line, to match name of the new target destination that you included in the snmpTargetAddrEntry above (see Step 7). These names must match exactly.

13 Save the snmpd.cnf file. Save a backup copy of the file.

14 From the same Command Prompt window, start the SNMP Master Agent by typing the following at the command line:

# /etc/srconf/exe/snmpdm&

 

Outlook

Once the system is running, you can point to a corporate SNMP system, such as HP OpenView or Castlerock.