Use the sm_service command to manually create a service for the SNMP Trap Adapter configured as a trap exploder. A typical service command on a UNIX host looks like this:
/opt/InCharge8/SAM/smarts/bin/sm_service install --force --unmanaged --startmode=runonce --name=ic-trap-exploder --description=”VMware Smart Assurance SNMP Trap Exploder” /opt/InCharge8/SAM/smarts/bin/sm_trapd --name=INCHARGE-EXPLODER --config=trapd --port=162 --rules=default --seed=<seed file> --output
(Second --name option in service command): Specifies the trap exploder name to be registered with the Broker for the deployment. Also -n <name>.
Specifies the configuration directory in which the trapd.conf file for the trap exploder is located. The trapd.conf file is loaded from the BASEDIR/smarts/local/conf/<cfg> directory, or from the BASEDIR/smarts/conf/<cfg> directory if the trapd.conf file is not present in the local directory. The default configuration (<cfg>) directory for the trap exploder is trapd.Note:
Ensure that --config is set to trapd in the trap exploder service command.
--port=<trap listening port>
Specifies the port number to which the managed network devices send traps and on which the trap exploder listens for traps. Also -p <trap listening port>.
The default trap listening port is the PORT parameter value in the <cfg>/trapd.conf file (port 9000 by default), or port 162 if no PORT value is specified in the <cfg>/trapd.conf file.
--sport=<Remote API listening port>
Specifies the port number on which the trap exploder listens for Remote API connections from other VMware Smart Assurance programs—the Global Console, servers, and utilities such as dmctl. This option is meaningful only if the --name option is specified. Also -P <Remote API listening port>.
The --sport option for the sm_trapd program plays the same role as the --port option plays for any other VMware Smart Assurance program. The --sport option is unique to the sm_trapd program and defaults to 0.Note:
--sport=0 is interpreted by the host operating system as meaning “assign this program a unique, unused port number.” Typically, the operating system responds by assigning a unique, unused port number in the range 40000–65535.
Specifies the rule set to be used by the trap exploder. The default rule set is defined in the BASEDIR/smarts/rules/trapd/trapParse.asl file.
Required for processing SNMPv3 traps. The --seed option specifies the name of the seed file that the trap exploder should use to access credentials when authenticating and decrypting SNMPv3 traps. The seed file is loaded from the BASEDIR/smarts/local/conf/<cfg> directory, or from the BASEDIR/smarts/conf/<cfg> directory if the seed file is not present in the local directory. The default configuration (<cfg>) directory is trapd; there is no default seed file name.Note:
In the sample service command, the seed file name is seedfile. For --seed=seedfile, ensure that a seed file named seedfile is in the conf/trapd directory.
Specifies that the stdout and stderr output for the trap exploder should be redirected to a log file in the BASEDIR/smarts/local/logs directory. By default if a value for <file> is omitted, the log file is named sm_trapd_en_US_UTF-8.log. If you specify --output=INCHARGE-EXPLODER, then the log is saved as INCHARGE-EXPLODER_en_US_UTF-8.log.
For example, here is the UNIX command for restarting a trap exploder service installed as ic-trap-exploder in the Service Assurance Manager installation area:
/opt/InCharge8/SAM/smarts/bin/sm_service start ic-trap-exploder
At startup, the trap exploder reads the trapd.conf file and saves the configuration information in its repository.