Secondary trap destinations are managed with the es-trapdest command.
The syntax for the es-trapdest command is:
es-trapdest [-c] [-a host:port] [-v] [-u] [-f] [-d entrynum ] [-l]
Option |
Modifying Options |
Description |
---|---|---|
-c |
Sun Management Center Component such as agent, platform. Agent is the default component. |
|
-l |
List the currently specified secondary trap destinations. |
|
-d |
entrynum |
Delete a currently specified secondary trap destination. entrynum is the number of the currently specified secondary trap destination to be deleted. entrynum must match the number listed using the -l option. |
-a |
host:port |
Add a new secondary trap destination. |
-v |
SNMP Version (SNMPv1, SNMPv2c, SNMPv2u, or SNMPv3) |
|
-u |
SNMP User/Community |
|
-f |
Trap Filter. The list of OIDs or trap names to be sent to destination. If NOT is the first element, all traps are sent EXCEPT the ones listed. |
You can also specify the following optional parameters when adding a new secondary trap destination with the es-trapdest -a command:
Specify SNMP version: SNMPv1, SNMPv2c, SNMPv2u, or SNMPv3
Specify the SNMP community or user name
Specify the trap filter
Trap filters are specified as a list of criteria, which can be either a series of numerical OID prefixes or a series of these mnemonic trap names:
sunmcTraps
snmpTraps
coldStart
warmStart
linkDown
linkUp
authenticationFailure
The trap name sunmcTraps represents the OID prefix for all Sun Management Center enterprise-specific traps, and the trap name snmpTraps represents the OID prefix for all the standard traps defined in the SNMP RFCs.
Trap filters can be either positive or negative. A positive filter specifies which traps to send. A negative filter specifies which traps should not be sent. A negative filter is defined by specifying NOT as the first criterion.
For example, to forward only standard SNMP traps to the secondary trap destination, specify the filter as -f "snmpTraps".
To forward all traps except Sun Management Center enterprise-specific traps to the secondary trap destination, specify the filter as -f "NOT sunmcTraps".
Filter specifications that contain spaces must be enclosed in quotation marks to prevent misinterpretation by the shell.
The following command adds machine02:162 as a secondary trap destination that only receives warmStart and coldStart traps for the Sun Management Center agent:
es-trapdest -a machine02:162 -f "warmStart coldStart"
Each instance of a platform agent can have its own set of secondary trap destinations. To specify secondary trap destinations for a particular instance of a platform agent, use the -c instance option to the es-trapdest command, where instance is the name of the platform agent instance. If the -c is not specified as an argument to the es-trapdest command, the es-trapdest command uses the default value of agent, which manages the secondary trap destinations for the Sun Management Center agent component.