Re: How to use examples/notification.c

"Duy-Ky Nguyen" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <002001c915cc$3238e170$0301010b@dknwxp>
Hi Mike,

You're absolutely right, of course ;-)

I ran snmpd with notification included and with right HOST in snmpd.conf, now I see SNMP in wireshark ;-)

Regarding stand-alone snmptrap, I guess either to create a script using command "snmptrap" or customize its source code with its own Makefile for a customized command line "snmptrap_a" ???

Thanks so much for your very very great help, Mike, Dan

Best Wishes,

Duy
  ----- Original Message ----- 
  From: Vahid K 
  To: Mike Ayers ; dan anderson ; Duy-Ky Nguyen 
  Cc: [email protected] 
  Sent: Saturday, September 13, 2008 5:39 AM
  Subject: RE: How to use examples/notification.c


  Hi Mike,

  How does that work?  I mean sending snmp traps from a standalone application.  Is there any simple sample code I could look at?
  Also I assume doing this way would not require snmpd running.  Correct?
  Thanks,
  -Vahid

  > Subject: RE: How to use examples/notification.c
  > Date: Fri, 12 Sep 2008 15:10:37 -0700
  > From: [email protected]
  > To: [email protected]; [email protected]
  > CC: [email protected]
  > 
  > 
  > Also note that this is an example of sending notifications from a subagent. Sending notifications from a separate application is a little different.
  > 
  > 
  > HTH,
  > 
  > Mike
  > 
  > 
  > > -----Original Message-----
  > > From: [email protected] 
  > > [mailto:[email protected]] On 
  > > Behalf Of dan anderson
  > > Sent: Friday, September 12, 2008 3:02 PM
  > > To: Duy-Ky Nguyen
  > > Cc: [email protected]
  > > Subject: Re: How to use examples/notification.c
  > > 
  > > snmptrapd is a trap listening daemon, and will not send traps.
  > > 
  > > notification.c & .h will compile into a module which sends a
  > > notification/trap (netSnmpExampleNotification is the one) twice a
  > > minute. So with the snmptrapd running, if you then compile the
  > > notification example into the agent (snmpd), put localhost in the
  > > config file as a sink, and run snmpd, then your snmptrapd should get
  > > notifications every 30 seconds.
  > > 
  > > -Dan
  > > 
  > > 2008/9/12 Duy-Ky Nguyen <[email protected]>:
  > > > Hello,
  > > >
  > > > In the directory net-snmp-5.2.5/agent/mibgroup/examples, 
  > > there is a file
  > > > describing how to send a notification from inside the agent.
  > > >
  > > > I did
  > > > ./configure --with-mib-modules="examples/notification
  > > > as required, then make install
  > > >
  > > > But I'm not sure how this notification gets executed ???
  > > > Is it executed by snmptrapd ???
  > > >
  > > > Your help is greatly appreciated
  > > >
  > > > Duy Kyng
  > > >
  > > > 
  > > --------------------------------------------------------------
  > > -----------
  > > > This SF.Net email is sponsored by the Moblin Your Move 
  > > Developer's challenge
  > > > Build the coolest Linux based applications with Moblin SDK 
  > > & win great
  > > > prizes
  > > > Grand prize is a trip for two to an Open Source event 
  > > anywhere in the world
  > > > http://moblin-contest.org/redirect.php?banner_id=100&url=/
  > > > _______________________________________________
  > > > 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
  > > >
  > > >
  > > 
  > > --------------------------------------------------------------
  > > -----------
  > > This SF.Net email is sponsored by the Moblin Your Move 
  > > Developer's challenge
  > > Build the coolest Linux based applications with Moblin SDK & 
  > > win great prizes
  > > Grand prize is a trip for two to an Open Source event 
  > > anywhere in the world
  > > http://moblin-contest.org/redirect.php?banner_id=100&url=/
  > > _______________________________________________
  > > 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
  > > 
  > 
  > -------------------------------------------------------------------------
  > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
  > Build the coolest Linux based applications with Moblin SDK & win great prizes
  > Grand prize is a trip for two to an Open Source event anywhere in the world
  > http://moblin-contest.org/redirect.php?banner_id=100&url=/
  > _______________________________________________
  > 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


------------------------------------------------------------------------------
  Want to do more with Windows Live? Learn “10 hidden secrets” from Jamie. Learn Now

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

_______________________________________________
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.