How to specify a simple regex for snap trap handler registration in perl

2016-07-26 Thread Sateesh Hegde
Hi, My snmptrapd.conf has something like following ignoreAuthFailure yes disableAuthorization yes donotlogtraps true outputOption ft perl NetSNMP::TrapReceiver::register("default", \&my_receiver); perl do "/etc/snmp/traphandler.pl"; perl NetSNMP::TrapReceiver::register("1.3.6.1.4.1.98765.1.1.7.

Re: Accessing %SNMP::MIB in Perl trap handler affects stringification of OID

2014-12-04 Thread Kevin Broadey
ALL the Perl script output, so the problem is deeper > than the Perl layer. Somehow, accessing %SNMP::MIB has affected the > underlying Net-SNMP C library. > > The line that causes the damage is 'print "$oid parent label = > $SNMP::MIB{$1}->{label}\n”;’ when called for S

Accessing %SNMP::MIB in Perl trap handler affects stringification of OID

2014-12-03 Thread Kevin Broadey
D name. Can someone please give this a try and tell the list whether you can reproduce my observations? Can someone tell me what to do to avoid this behaviour? As you can imagine, this is seriously hampering my trap handler development

How to force snmptrapd to pass pure numerical OIDs to the trap handler (readable)

2013-07-22 Thread Jurkiewicz Jean-Marc
/my_great_script cold The trap received by my traps handler, on Fedora 19 are no longer "pure" numerical, but looks like : SNMPv2-SMI::enterprises.9.9.215.2.0.1, when the trap handler expect pure numerical OIDs, as well as the my "private" trapd config file : # EV

How to force snmptrapd to pass pure numerical OIDs to the trap handler

2013-07-18 Thread Jurkiewicz Jean-Marc
::coldStart/usr/bin/bin/my_great_script cold The trap received by my traps handler, on Fedora 19 are no longer "pure" numerical, but looks like : SNMPv2-SMI::enterprises.9.9.215.2.0.1, when the trap handler expect pure numerical OIDs, as well as the my "private" trapd confi

RE: using net-snmp trap handler code with C++

2008-03-24 Thread Mike Ayers
> From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of [EMAIL PROTECTED] > Sent: Monday, March 24, 2008 5:49 AM > While calling snmp_send() for sending a trap packet I am > getting the following error > No log handling enabled - turning on stderr logging > snmp_build: unknown fa

using net-snmp trap handler code with C++

2008-03-24 Thread singh.srajendra
Hi , While calling snmp_send() for sending a trap packet I am getting the following error No log handling enabled - turning on stderr logging snmp_build: unknown failure what does this error mean ? Thank you for your valuable time. Regards, Rajendra --

Re: Trap Handler for Net-snmp 5.3.1

2008-03-04 Thread Dave Shield
On 03/03/2008, Shreya Shah <[EMAIL PROTECTED]> wrote: > The traps are logging and I can see them in the file as well as when I > do a tcpdump. Now I'm completely confused. You say that the traps are being logged, yet you've also said that you are running the trap receiver as snmptrapd -f

Re: Trap Handler for Net-snmp 5.3.1

2008-03-03 Thread Shreya Shah
I am using snmptrapd.conf to generate traps. I have the same snmp community string set in the snmptrapd.conf and the device I want to monitor and I have given a log and execute permission for logging the traps in the desired file. The traps are logging and I can see them in the file as well as when

Re: Trap Handler for Net-snmp 5.3.1

2008-03-03 Thread Dave Shield
On 03/03/2008, Shreya Shah <[EMAIL PROTECTED]> wrote: > Yes that is all that is displayed. I have already stopped firewall service > in iptables. How are you generating the traps? Dave - This SF.net email is sponsored by: Mi

Re: Trap Handler for Net-snmp 5.3.1

2008-03-03 Thread Shreya Shah
to net-snmp and Linux, I have configured snmptrapd.conf > > net-snmp 5.3.1 and when I start the daemon I receive traps but its just > not > > invoking the trap handler. When I use the command snmptrapd -f -Le > > -Dsnmptrapd -d it just gives me > >[snip] > > I

Re: Trap Handler for Net-snmp 5.3.1

2008-03-03 Thread Dave Shield
On 27/02/2008, Shreya Shah <[EMAIL PROTECTED]> wrote: > I am a newbie to net-snmp and Linux, I have configured snmptrapd.conf > net-snmp 5.3.1 and when I start the daemon I receive traps but its just not > invoking the trap handler. When I use the command snmptrapd -f -Le > -Dsn

Trap Handler for Net-snmp 5.3.1

2008-02-27 Thread Shreya Shah
Hi, I am a newbie to net-snmp and Linux, I have configured snmptrapd.confnet-snmp 5.3.1 and when I start the daemon I receive traps but its just not invoking the trap handler. When I use the command snmptrapd -f -Le -Dsnmptrapd -d it just gives me registered debug token snmptrapd, 1 snmptrapd

Trap handler

2007-08-22 Thread zuljin
Hi, I want to write simple trap handler that will receive traps/informs caught by snmptrapd. Idea is that snmptrapd will, using "forward" option, send all traps/informs to my application (it will be COM object written in C++). Regarding this I have few questions: - How I should

RE: Need Help In SNMP Trap handler

2006-09-27 Thread jitendra.sanghani
  -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dave Shield Sent: Wednesday, September 27, 2006 7:18 PM To: Jitendra Sanghani (WT01 - Embedded Systems) Cc: net-snmp-users@lists.sourceforge.net Subject: Re: Need Help In SNMP Trap handler   On

Re: Need Help In SNMP Trap handler

2006-09-27 Thread Dave Shield
On 12/09/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I am new to the Net-SNMP. I want to read the traps from the agent in the > Linux. I had installed the Net-SNMP Library. But I am not able to configure > the Snmptrapd.conf file. In configuration how I can add parameters under > "Access Con

Need Help In SNMP Trap handler

2006-09-12 Thread jitendra.sanghani
Hello   I am new to the Net-SNMP. I want to read the traps from the agent in the Linux. I had installed the Net-SNMP Library. But I am not able to configure the Snmptrapd.conf file. In configuration how I can add parameters under “Access Control” section so that my own application gets t

Re: Snmptrapd trap handler

2006-02-16 Thread Tom De Boeser
>I've written a replacement for the traptoemail script that is>distributed with the net-snmp package for use with the snmptrapd.>In addition, it provides some basic filtering of traps, allowing >certain events to be picked out, based on, for example, hostname,>switch port, mac address, etc. It can

Snmptrapd trap handler

2006-01-11 Thread Mark Mason
I've written a replacement for the traptoemail script that is distributed with the net-snmp package for use with the snmptrapd. In addition to the functionality provided by traptoemail (reporting traps via email), it logs the traps in two trees, sorted by date. One tree is organized by hostname,

Re: snmp trap handler issue (net-snmp-5.3.pre4)

2005-12-01 Thread Robert Story
On Wed, 30 Nov 2005 14:04:15 +1300 Holger wrote: H> >> Downloaded, compiled, tested, installed, all good - except the memory H> >> leak, which is still quite viable. H> > H> > Do you have a minimal test case to reproduce this? H> H> For version <= 5.2.2: H> H> Simply install SNMPTT (www.snmptt.o

Re: snmp trap handler issue (net-snmp-5.3.pre4)

2005-11-29 Thread Holger (Woosh)
Very good things! Downloaded, compiled, tested, installed, all good - except the memory leak, which is still quite viable. Do you have a minimal test case to reproduce this? For version <= 5.2.2: Simply install SNMPTT (www.snmptt.org) and add traphandle default /yourpath/sbin/snmptthandler

Re: snmp trap handler issue (net-snmp-5.3.pre4)

2005-11-29 Thread Thomas Anders
Holger (Woosh) wrote: First of all, Thomas, thank you very much for pointing me towards version 5.2.2! I'd suggest to try the just released 5.2.2 which will work out of the box for you. Downloaded, compiled, tested, installed, all good - except the memory leak, which is still quite viable.

Re: snmp trap handler issue (net-snmp-5.3.pre4)

2005-11-29 Thread Holger (Woosh)
First of all, Thomas, thank you very much for pointing me towards version 5.2.2! I'd suggest to try the just released 5.2.2 which will work out of the box for you. Downloaded, compiled, tested, installed, all good - except the memory leak, which is still quite viable. Next attempt: As for 5

Re: snmp trap handler issue (net-snmp-5.3.pre4)

2005-11-29 Thread Thomas Anders
Holger Jahn wrote: At last, I tried the ultimate version 5.3.pre4, just to find that there is no memory leak any more - but also no trap handling. I'd suggest to try the just released 5.2.2 which will work out of the box for you. As for 5.3.pre4 (and later), please note the following NEWS s

snmp trap handler issue (net-snmp-5.3.pre4)

2005-11-28 Thread Holger Jahn
Hi there, I stumbled across an issue today, which might be of interest to you as well... ;-) What I am using on our box here is basically a SNMP trap handler chain to inject traps into Nagios, i.e. snmptrapd => snmptt => sec => nagios. With Net_SNMP version 5.1.2 everything is worki

Re: 5.2.1 Trap Handler causes snmptrapd to exit from broken pipe

2005-03-09 Thread Michael Higgins
Robert Story wrote: On Tue, 08 Mar 2005 17:01:23 -0800 Michael wrote: MH> I added the code to ignore the SIGPIPE signal and found that I also had MH> to remove the close(2) to get to the execv() call that runs the trap MH> handler. That is really odd. I can't think of why a close call would not

Re: 5.2.1 Trap Handler causes snmptrapd to exit from broken pipe

2005-03-09 Thread Robert Story
On Tue, 08 Mar 2005 17:01:23 -0800 Michael wrote: MH> I added the code to ignore the SIGPIPE signal and found that I also had MH> to remove the close(2) to get to the execv() call that runs the trap MH> handler. That is really odd. I can't think of why a close call would not return. The only thi

Re: 5.2.1 Trap Handler causes snmptrapd to exit from broken pipe

2005-03-08 Thread Michael Higgins
appears that two MH> threads are responsible for making this happen. One gets the trap MH> handler process running and the other writes to its stdin and waits for MH> any output. MH> MH> What I see happening is the thread that is initiating the trap handler MH> does some

Re: 5.2.1 Trap Handler causes snmptrapd to exit from broken pipe

2005-03-08 Thread Michael Higgins
> threads are responsible for making this happen. One gets the trap MH> handler process running and the other writes to its stdin and waits for MH> any output. MH> MH> What I see happening is the thread that is initiating the trap handler MH> does some manipulation of file

Re: 5.2.1 Trap Handler causes snmptrapd to exit from broken pipe

2005-03-08 Thread Robert Story
ble for making this happen. One gets the trap MH> handler process running and the other writes to its stdin and waits for MH> any output. MH> MH> What I see happening is the thread that is initiating the trap handler MH> does some manipulation of file descriptors, closing the s

Re: 5.2.1 Trap Handler causes snmptrapd to exit from broken pipe

2005-03-07 Thread Michael Higgins
ged after increasing the verbosity of the debug messages. BTW, the original post had some erroneous text (copy/paste error) in the trap handler shell script. It should be: traps.sh: #!/bin/sh read host read ip vars= while read oid val do if [ "$vars" = "" then vars=&

Re: 5.2.1 Trap Handler causes snmptrapd to exit from broken pipe

2005-03-07 Thread Dave
[Michael Higgins]: > I did a little digging and it looks like the problem is in > agent/mibgroup/utilities/execute.c in run_exec_command(). I don"t know > a whole lot about how this is architected, but it appears that two > threads are responsible for making this happen.

5.2.1 Trap Handler causes snmptrapd to exit from broken pipe

2005-03-04 Thread Michael Higgins
mmand(). I don't know a whole lot about how this is architected, but it appears that two threads are responsible for making this happen. One gets the trap handler process running and the other writes to its stdin and waits for any output. What I see happening is the thread that is init

Re: Perl Trap Handler and enterprise MIB lookup

2004-12-16 Thread Andy Ford
No need to respond as I have found SNMP::MIB::Compiler in CPAN that looks interesting Thanks Andy Forwarded Message From: Andy Ford <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: Perl Trap Handler and enterprise MIB lookup Date: Tue, 14 Dec 2004 10:16:24 + Hi ev

Perl Trap Handler and enterprise MIB lookup

2004-12-16 Thread Andy Ford
Hi everyone I have added some extra code to the Perl Trap Handler to do the following... Determine the trap type if(trap == RFC1215 snmptrap) { 1. Lookup in a database whether the ifIndex is managed. 2. Append extra information to the trap