Notification Filtering NetSNMP

<[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
> Hi Mark ,
>
> I had a small doubt in the notification filtering which you were trying to do few years back.
> Firstly, is notification filtering available in NetSNMP 5.4 release because the website says (in the FAQ section) that the feature is still working on?
> But the release notes for 5.3 version says that the notification filtering and logging have been included in this release.
>
> How did this happen?
> Moreover, the code for notification filtering is present in the 5.3.1 source code which I could download from a site.
>
> Please clarify on this issue?
>
> Thanks and Regards,
> Aditya
> Project Engineer
> WIPRO Technologies
> Manikonda
> Hyderabad
>
> P.S. Please refer the following thread for more information.
>
> Hi, 
> I am looking at the net-snmp-5.2.1.2 distribution to figure out if I can 
> populate the SNMP notification filtering tables and then use these 
> tables to filter outgoing notifications based upon the value of the 
> snmpTrapOID.0 varbind in the outgoing pdu. 
> I see calls to the snmpd_register_config_handler() routine for the 
> snmpNotify*Table configuration token handlers, but I do not see any code 
> on the way out (diving down send_v2trap()) that might make the 
> appropriate comparisons for filtering.  It appears that each registered 
> trap2sink receives all notifications or none. 
> If someone could point me in the right direction with respect to 
> filtering of notifications originated at the agent, I'd appreciate it. 
> Regards, 
> Mark 
>   



"Anna Edwards"
View profile

 More options Oct 3 2005, 1:12 am 


Newsgroups: mailing.unix.net-snmp-users
From: [email protected] ("Anna Edwards")
Date: Mon, 3 Oct 2005 03:42:17 +0800 (CST)
Local: Mon, Oct 3 2005 1:12 am
Subject: RE: notification filtering
Reply to author | Forward | Print | Individual message | Show original | Report this message | Find messages by this author Hi Mark, I'm by no means an expert in this field, but I've been digging around in = that same area for a few weeks now, and here's my conclusions: 
The net-snmp agent has the ability to populate the SNMP-NOTIFICATION-MIB = and SNMP-TARGET-MIB tables, if the agent is configured to include the = modules. There are two calls to callback function at the end of the = netsnmp_send_traps (in agent_trap.c) which can do the sending of = notifications to traps other than those configured as static trapsinks. = The send_notifications function in snmpNotifyTable.c is registered to do = this, and looks at the entries in the snmpNotifyTable and = snmpTargetAddrTable to determine what targets to send to. There is = support to pass a pointer to a function (of type TargetFilterFunction -- = see target.h) to get_target_sessions to do the actual filtering = according to the notification filter tables, however no such function = exists as of yet. So, the all framework is there to do the filtering; = you just need to write the actual filtering function that refers to the = entries in the filter tables with the matching parameter and OIDs (which = is surely easier said than done...) Hope this helps, good luck! 
________________
Anna Edwards
Software Engineer
Direct: 519-880-2400 ext 2960
www.sandvine.com 


Mark Ellison
View profile
Newsgroups: mailing.unix.net-snmp-users
From: [email protected] (Mark Ellison)
Date: Tue, 4 Oct 2005 03:24:59 +0800 (CST)
Local: Tues, Oct 4 2005 12:54 am
Subject: Re: notification filtering
Reply to author | Forward | Print | Individual message | Show original | Report this message | Find messages by this author Hi Anna, Thanks for the good pointer.  I guess this area is still under=20 construction.  I can see in the source code how the execution path uses=20 the snmp_call_calbacks() method to invoke the send_notifications()=20 method in snmpNotifyTable.c. which in turn calls the=20
get_target_sessions() method.  The second parameter of the=20
get_target_sessions() method provides the method address for the=20 filterfunc routine.  In the 5.2.1.2 code I have, this second parameter=20 is null.  I used gdb to step into the get_target_sessions, and found the = parm values were always (interal0, NULL, NULL).=20 Thanks for helping me understand whats going on here! 
Regards,
Mark
Anna Edwards wrote: 
>Hi Mark,
>I'm by no means an expert in this field, but I've been digging around 
>in=
 that same area for a few weeks now, and here's my conclusions: 
>The net-snmp agent has the ability to populate the 
>SNMP-NOTIFICATION-MIB=
 and SNMP-TARGET-MIB tables, if the agent is configured to include the mo= dules. There are two calls to callback function at the end of the netsnmp= _send_traps (in agent_trap.c) which can do the sending of notifications t= o traps other than those configured as static trapsinks. The send_notific= ations function in snmpNotifyTable.c is registered to do this, and looks = at the entries in the snmpNotifyTable and snmpTargetAddrTable to determin= e what targets to send to. There is support to pass a pointer to a functi= on (of type TargetFilterFunction -- see target.h) to get_target_sessions = to do the actual filtering according to the notification filter tables, h= owever no such function exists as of yet. So, the all framework is there = to do the filtering; you just need to write the actual filtering function=
 that refers to the entries in the filter tables with the matching parame= ter and OIDs (which is surely easier said than done...) 
 


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.