Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Fulko Hew <fulko.hew <at> gmail.com>
Subject: Re: agentx: how do I register my traps
Newsgroups: gmane.network.net-snmp.user
Date: Thursday 12th April 2012 20:09:28 UTC (over 4 years ago)
On Thu, Apr 12, 2012 at 3:17 PM, St├ęphane Charette <
[email protected]> wrote:

> Just joined the list 30 seconds ago.  :)  I'm working with net-snmp and
> agentx. I have to register my enterprise OIDs for scalars and tables. For
> example:
>
> > netsnmp_register_read_only_scalar(...); // register my scalars
> > netsnmp_tdata_register(...); // register my table
>
> Until I make those calls in my agentx code, my OIDs don't show up in
snmpd.
>
> My MIB file also has NOTIFICATION-TYPE definitions, such as:
>
> > myTrapTest NOTIFICATION-TYPE
> >     STATUS          current
> >     DESCRIPTION     "A sample trap."
> >     ::= { myNotifications 1 }
>
> I took a look at #include  but this file
> seems to be about sending traps, not registering custom ones.
>
> My question: What do I call to register my trap definitions?
>

You need to 'register' variables/tables so that the master
agent knows which sub-agent to call/invoke (you versus the other guy)
when a particular OID is get/set, but...

You don't have to 'register' trap definitions, you simply have to
'send' the (correctly composed) notification (agentx-Notify-PDU).

... because here, _you_ are the one in control, and the master (in this
case) doesn't care where the notification is originating from or
what it contains.  It is simply re- formats what it gets and directs
your notifications to the configured NMSs.
 
CD: 17ms