You can specify multiple secondary trap destinations for Sun Management Center agents with the es-trapdest command. Secondary trap destinations (zero or more) receive the same set of traps that are sent to the primary trap destination. Secondary trap destinations do not receive event traps. By default, all traps sent to secondary destinations use SNMPv2c with a community of public. The security level for secondary destinations is noauth.
Secondary trap destinations are managed with the es-trapdest command. You can use the following options with the command.
Table 2–3 es-trapdest Options
To do this |
Type |
---|---|
List the currently specified secondary trap destinations |
es-trapdest -l |
Delete a currently specified secondary trap destination |
es-trapdest -d n where n is the number of the currently specified secondary trap destination you want to delete as displayed by the es-trapdest -l command. |
Add a new secondary trap destination |
es-trapdest -a host:port where host is the name of the destination host and port is the number of the destination port. |
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, or SNMPv2u
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.