Use the sm_service command to manually create a service for the trap exploder. A typical service command on a UNIX host would look like this:
/opt/InCharge/SAM/smarts/bin/sm_service install --force --unmanaged --startmode=runonce --name=ic-trap-exploder --description=”VMware Smart Assurance SNMP Trap Exploder” /opt/InCharge/SAM/smarts/bin/sm_trapd --name=INCHARGE-EXPLODER --config=trapd --port=162 --rules=default --output
where:
-
--name=<name>
Second --name option (--name=INCHARGE-EXPLODER) in the service command: Specifies the trap exploder name to be registered with the Broker for the deployment. Also -n <name>.
-
--config=<cfg>
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 Smarts programs, including 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 Smarts 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.
-
--rules=default
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.
-
--output
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. The name of the log file is INCHARGE-EXPLODER_<locale>_<character encoding>.log; for example, INCHARGE-EXPLODER_en_US_UTF-8.log.
The command for starting the example service is:
/opt/InCharge/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.
The Smarts System Administration Guide provides more details about sm_service.