dropbox / trapperkeeper

A suite of tools for ingesting and displaying SNMP traps.
Other
82 stars 26 forks source link

testing trapperkeeper #12

Closed christiancadieux closed 8 years ago

christiancadieux commented 8 years ago

I get these warnings when starting trapperkeeper: sudo bin/trapperkeeper -c conf/trapperkeeper.yaml WARNING:root:Failed to process traphandler TRAPPERKEEPER-MIB::testV1Trap: Unknown Object Identifier WARNING:root:Failed to process traphandler SNMPv2-MIB::coldStart: Unknown Object Identifier WARNING:root:Failed to process traphandler TRAPPERKEEPER-MIB::testV2Trap: Unknown Object Identifier I tried changing MIBDIRS=

Also, when I try the tests, I get usage error: echo "snmptrap -v 1 $COMMON_OPTS $DEST TRAPPERKEEPER-MIB::testtraps "" 6 1 "" $SYSLOC_VARBIND" snmptrap -v 1 -Ln -mTRAPPERKEEPER-MIB -M+/opt/trapperkeeper/trapperkeeper-master/tests/mibs -c public localhost TRAPPERKEEPER-MIB::testtraps 6 1 SNMPv2-MIB::sysLocation.0 s TrapperKeeper-Test MIB search path: /opt/trapperkeeper/trapperkeeper-master/tests/mibs/ Cannot find module (SNMPv2-SMI): At line 7 in /opt/trapperkeeper/trapperkeeper-master/tests/mibs//DROPBOX-SMI.my

not sure if it's a config issue. thanks

gmjosack commented 8 years ago

The warnings likely mean that you don't have the MIBs in the netsnmp path. You should be able to verify with something like

$ snmptranslate -On SNMPv2-MIB::coldStart
.1.3.6.1.6.3.1.1.5.1
$ snmptranslate -On TRAPPERKEEPER-MIB::testV1Trap
.1.3.6.1.4.1.42921.1.1.1.0.1

The quick test script is unfortunately not very great nor robust but it looks like the error you're getting is related to SNMPv2-SMI which DROPBOX-SMI imports. In addition to MIBDIRS for the trapperkeeper mibs you need to make sure the place where the rest of your mibs are stored are on the path. I also usually add MIBS=ALL to the environment to make sure all of the mibs found are loaded.

christiancadieux commented 8 years ago

thank youI did:export MIBDIRS=/usr/local/share/snmp/mibscopied the test mibs to that same directory and ran:$ sudo -E bin/trapperkeeper -c conf/trapperkeeper.yamland it works fine (I was forgetting the -E to keep the environment) I am hoping to add functionality to write traps to kafka instead of logging them. Have you seen a use case like this before?thanks again From: Gary M. Josack notifications@github.com To: dropbox/trapperkeeper trapperkeeper@noreply.github.com Cc: christiancadieux christian_cadieux@yahoo.com Sent: Wednesday, December 9, 2015 12:05 PM Subject: Re: [trapperkeeper] testing trapperkeeper (#12)

The warnings likely mean that you don't have the MIBs in the netsnmp path. You should be able to verify with something like$ snmptranslate -On SNMPv2-MIB::coldStart .1.3.6.1.6.3.1.1.5.1 $ snmptranslate -On TRAPPERKEEPER-MIB::testV1Trap .1.3.6.1.4.1.42921.1.1.1.0.1The quick test script is unfortunately not very great nor robust but it looks like the error you're getting is related to SNMPv2-SMI which DROPBOX-SMI imports. In addition to MIBDIRS for the trapperkeeper mibs you need to make sure the place where the rest of your mibs are stored are on the path. I also usually add MIBS=ALL to the environment to make sure all of the mibs found are loaded.— Reply to this email directly or view it on GitHub.

gmjosack commented 8 years ago

I haven't seen that but I think it'd be useful. I'd like to abstract out the backend a bit more to allow for storing in systems other than databases rather than explicitly add support for kafka. This isn't something we have planned to work on right now though. If you created a solution that was suitably generic I'd be happy to get it merged back.

I'm going to close this issue for now. Thanks for reporting back that you got it working!

christiancadieux commented 8 years ago

Himaybe a silly question but what does 'DDE' stand for. I was thinking Dynamic Data Exchange but not sure.thank you

  From: Gary M. Josack <notifications@github.com>

To: dropbox/trapperkeeper trapperkeeper@noreply.github.com Cc: christiancadieux christian_cadieux@yahoo.com Sent: Wednesday, December 9, 2015 12:05 PM Subject: Re: [trapperkeeper] testing trapperkeeper (#12)

The warnings likely mean that you don't have the MIBs in the netsnmp path. You should be able to verify with something like$ snmptranslate -On SNMPv2-MIB::coldStart .1.3.6.1.6.3.1.1.5.1 $ snmptranslate -On TRAPPERKEEPER-MIB::testV1Trap .1.3.6.1.4.1.42921.1.1.1.0.1The quick test script is unfortunately not very great nor robust but it looks like the error you're getting is related to SNMPv2-SMI which DROPBOX-SMI imports. In addition to MIBDIRS for the trapperkeeper mibs you need to make sure the place where the rest of your mibs are stored are on the path. I also usually add MIBS=ALL to the environment to make sure all of the mibs found are loaded.— Reply to this email directly or view it on GitHub.

gmjosack commented 8 years ago

It's the Dynamic Decision Engine. I need to get better docs for that.