In order to create different trap listening ports, a copy of trapd.conf must be created for every IP domain that you run out of a single installation directory. The following procedure explains how to create multiple copies of trapd.conf with different listening ports. Each trapd.conf file must be stored in a different directory path, for example, in BASEDIR/smarts/local and in BASEDIR/smarts/local2. Create only those subdirectories in BASEDIR/smarts/local2 that are necessary to store the custom files needed to support multiple trap receivers; do not copy the complete BASEDIR/smarts/local folders into /local2.
- Create InCharge/IP/smarts/local2/conf/trapd.
- Copy InCharge/IP/smarts/local/conf/trapd/trapd.conf to InCharge/IP/smarts/local2/conf/trapd/trapd.conf.
- Set SM_SITEMOD using sm_edit utility on runcmd_env.sh file by modifying below parameter and save modified copies of default files under <local2> directory structure.
SM_SITEMOD=/opt/InCharge/IP/smarts/local2;/opt/InCharge/IP/smarts/local;/opt/InCharge/IP/smarts/
- Use sm_edit to modify trapd.conf file:
/opt/InCharge/IP/smarts/bin/sm_edit /opt/InCharge/IP/smarts/conf/trapd/trapd.conf
- Change the PORT parameter value from PORT: 9000 to PORT: 9001 and then save the file. The file should be saved under:
/opt/InCharge/IP/smarts/local2/conf/trapd
- Register the new Domain Manager as a service and specify a separate local directory and directory for log files. Run the below command from BASEDIR\smarts\bin.
Note: The following command must be entered as one line. This example is given for an INCHARGE-AM-PM server. Replace the server name with the name of your Availability Manager server or a combination Availability Manager/Performance Manager server if that is your deployment scenario.
sm_service install --force --name=ic-am-pm-server-2 --description="INCHARGE-AM-PM for Site 2" --startmode=runonce --env=SM_SITEMOD=/opt/InCharge/IP/smarts/local2;/opt/InCharge/IP/smarts/local;/opt/InCharge/IP/smarts /opt/InCharge/IP/smarts/bin/sm_server --name=INCHARGE-AM-PM-2 --config=icf --bootstrap=bootstrap-am-pm.conf --port=0 --subscribe=default --ignore-restore-errors --output