Per default, OPSCAWTO() snmp traps are send to port 162. Is there a way that we can send traps to another port? like ip-address:portnumber ??
The OPSCAWTO function uses the ENFSNMPM services to send SNMP traps.The port numbers can be setup in the ENFSNMPM configuration file.See the link below for the CA Common Services documentation where the configuration file is discussed:
Also, read the comments of the sample member SNMPCNFG that is distributed in the CAW0OPTV CA Common Services data set where there is more information.
Carlos Mario Filho Principal Support Engineer
but tdoesnt that change the port for ALL traps done via OPSCAWTO() ?
What if you need to direct different ttraps to different ip-addresses on different ports?
As you can see in the sample member SNMPCNFG it contains a list of address and respective port numbers. So depending the IP address used in the OPSCAWTO call, ENFSNMPM will send to different port number. The syntax of this member is:
node port protocol parameters
Here are the contents of the sample member
* 162 snmpv1 public 192.168.10.42 162 snmpv2c public 192.168.10.43 162 snmpv3 # no authentication, no privacy 192.168.10.143 162 snmpv3 ENGINEID 80000002058DCA410B7B4B72 USER userxyz + AUTH_MD5 41DEBB32E91D3BD03D03ED7BEE9AB194 PRIV_DES widget.acme.com 3116 snmpv3 ENGINEID 80000002058DCA410B7B4B72 USER userxyz + AUTH_MD5 41DEBB32E91D3BD03D03ED7BEE9AB194 PRIV_DES
See that this last address uses port number 3116 instead of 162. You can enter the destination address and the port number you wish for each server.
Ok, that means a config change in ENF then, so if the ipaddress of the server changes, we need to update enf
I'd hoped for a more dynamic solution. Thanks.