You are here: SwitchKit SNMP User’s Guide > 4 System Customization > Adding a Destination for Notifications on Windows®

Adding a Destination for Notifications on Windows®

This procedure describes how to add a new destination for notifications on Windows®, in addition to the 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.

Add a New Destination for Notifications on Windows®

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

1 Stop the SNMP Master Agent by opening a Command Prompt window and typing the following:

# net stop snmpdm

After stopping the SNMP Master Agent, the following messages should be displayed:

# The SNMP EMANATE Master Agent service is stopping.

# The SNMP EMANATE Master Agent service was stopped successfully.

2 Using a text editor, open the file
C:\Program Files\Cantata\etc\srconf\agt\snmpd.cnf .

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 line:

# snmpNotifyEntry 31 localhost_v1 trap nonVolatile

If your destination uses SNMP v2, copy and edit the 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. The Master Agent will modify the file if there are any errors.

14 From the same Command Prompt window, start the SNMP Master Agent by opening a Command Prompt window and typing the following:

# net start snmpdm

After restarting the SNMP Master Agent, the following message should be displayed:

# The SNMP EMANATE Master Agent service was started successfully.

15 If you have stopped the CSPAgent process, restart the process by opening a Command Prompt window and typing:

# cd C:\Program Files\Cantata\SNMP\srconf\bin

# cspAgent

16 If you have stopped the CSPEventManager process, restart the process by opening a Command Prompt window and typing:

# cd C:\Program Files\Cantata\SNMP\srconf\bin

# cspEventManager

You should not need to stop and restart the LLC and traprcv. You should now see notifications at the new destination.

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

Internet Protocol. Part of the TCP/IP family of protocols used to route messages and tracks the addresses of nodes.