Start a Conversation

Unsolved

This post is more than 5 years old

5072

October 15th, 2008 08:00

SNMP Trap Adapter

I have the following defined in trap_mgr.conf - from SMARTS how can I send a test to make sure I have everything defined correctly? I want to make sure both the notify and clear works. Also is there a way I can define that this trap should come from hosts - tor123, tor345 and tor456?

#cisADChannelFailure
BEGIN_TRAP .1.3.6.1.4.1.1619.3.2.1 6 7
ClassName: Host
InstanceName: $SYS$
EventName: cisADChannelFailure
Severity: 3
EventText: vars=$V*$
Expiration: 8640
State: NOTIFY
EventType: DURABLE
LogFile: cisadmain.log
END_TRAP

#cisADChannelIsActive
BEGIN_TRAP .1.3.6.1.4.1.1619.20.100.6.1.1 6 32
ClassName: Host
InstanceName: $SYS$
EventName: cisADChannelFailure
State: CLEAR
LogFile: cisadmain.log
END

54 Posts

October 21st, 2008 23:00

Hello,

You can specify it in the TRAP EXPLODER configuration.
This is where all the traps are coming in form the network.
local/conf/trapd/trapd.conf
enable the FORWARD option like:

PORT: 162
ENABLE_FWD: TRUE

FORWARD: * * *
FORWARD: * * *
FORWARD: * * *

the traphost port is 9091 in the example. The same port must be specified in the trap receiver config. The trap receiver will send the traps to the SAM OI Adapter for example.

The config files are located under local/conf/icoi
- trapd.conf
- trap_mgr.conf

In the trapd.conf file you have to do the following settings:
##########
#
# Set the parameters here.
PORT: 9091
#WINDOW: 10
#ASCII: FALSE
#TAG: FALSE
#ENABLE_FWD: TRUE
#MATCH: all

FORWARD: * * *
FORWARD: * * *
FORWARD: * * *

NOTE: The SAM OI Adapter is running on port 9500
As well the device must exist in the OI-Adapter. Otherwise you will not see any Notifications.
◆ Check using the dmctl command or through your topology browser.
dmctl -s get IP::IP- ::HostedBy
This should not have a null value.
◆ If you are checking via topology browser, check under IP section, expand it, select
your IP and see if it has HostedBy Relationship.


The easiest way is to install 2 services one for TRAP EXPLODER and one for TRAP RECEIVER.

example:
sm_service install --force --unmanaged --startmode=runonce \
'--name=TRAP-EXPLODER' \
'--description=SMARTS SNMP Trap Adapter' \
' /SAM/smarts/bin/sm_trapd' \
'--name=TRAP-EXPLODER' \
'--config=trapd' \
'--port=162' \
'--rules=default' \
'--output=TRAP-EXPLODER'

sm_service install --force --unmanaged --startmode=runonce \
'--name=TRAP-OI' \
'--description=SMARTS SNMP Trap Adapter' \
' /SAM/smarts/bin/sm_trapd' \
'--name=TRAP-OI' \
'--server=OI-Adapter' \
'--config=icoi' \
'--port=9091' \
'--model=sm_actions' \
'--rules=icoi-trapd/trap_mgr_parse.asl' \
'--output=TRAP-OI'

October 31st, 2008 10:00

Hi ,

if you want to test your trap_mgr.conf, simply configure a test SNMP receiver using it, then use snmptrap (UCD) or Smarts InCharge snmp command:

/opt/InCharge7/IP/smarts/bin/sm_snmp

to send the "fake" corresponding traps to your trap receiver.

--Fred

Frederic Meunier
Solutions Watch4Net Inc
APG & Smarts InCharge integration
http://www.watch4net.com

37 Posts

February 10th, 2010 01:00

As suggested by Fred, sample traps can be send using the sm_snmp command.

For exampls: sm_snmp -p -d trap

if you have two or more varbinds, the section after should be repeated.

For exampls. Sending a trap with two varbinds can be done as follows:

sm_snmp -p -d trap

3 Posts

September 14th, 2011 09:00

While executing the install for trap exploder ,I am getting error :

bash-3.00$ ./sm_service install --force --unmanaged --startmode=runonce '--name=TRAP-OI' '--description=SMARTS SNMP Trap Adapter' '/opt/InCharge8/SAM/smarts/bin/sm_trapd' '--name=TRAP-OI' '--server=OI-Adapter' '--config=icoi' '--port=9000' '--model=sm_actions' '--rules=icoi-trapd/trap_mgr_parse.asl' '--output=TRAP-OI'

Error :
SMS-E-CLI_EINSTALLABSPATH-The 'install' action requires an absolute path to an
    executable.

bash-3.00$ sudo /opt/qnms/sentryAdmin.sh ./sm_service install --force --unmanaged --startmode=runonce \
> '--name=TRAP-EXPLODER' \
> '--description=SMARTS SNMP Trap Adapter' \
> '/opt/InCharge8/SAM/smarts/bin/sm_trapd' \
> '--name=TRAP-EXPLODER' \
> '--config=trapd' \
> '--port=162' \
> '--rules=default' \
> '--output=TRAP-EXPLODER'

Error :
SMS-E-CLI_EINSTALLABSPATH-The 'install' action requires an absolute path to an
    executable.

2 Posts

November 16th, 2011 01:00

Am getting the Same error while installing the Broker.

No Events found!

Top