Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > SNMP agent library?

Reply
Thread Tools

SNMP agent library?

 
 
Marcus Bristav
Guest
Posts: n/a
 
      04-12-2007
I need to write an SNMP agent (raise traps and expose MIBs). Is there
a nice Ruby open source library to help with this? I saw Ruby SNMP but
that only seems to handle the management side of it. Please also let
me if I'm wrong about that.

Regards,

Marcus

 
Reply With Quote
 
 
 
 
Marcus Bristav
Guest
Posts: n/a
 
      04-13-2007
Hi Francis,

On 4/13/07, Francis Cianfrocca <(E-Mail Removed)> wrote:
> If you don't find anything appropriate that already exists, let me know. I
> wrote a SNMP agent on top of EventMachine (except for traps, which in my
> application are verboten) for managing an access-control appliance. It
> exposes a handful of standard MIBs and of course it's extensible.
>
> I put some of the necessary SNMP protocol support in the Net::LDAP library,
> so it can use the BER functionality. This may be useful if you end up
> rolling your own agent. Sync to the latest source code, because it's not in
> the latest Net::LDAP release, which is somewhat out of date.


I'd be very interested in this. Is the SNMP code available somewhere
or is it used in your company? Traps would be possible to add I
suppose (if I study the protocol somewhat...)?

/Marcus

 
Reply With Quote
 
 
 
 
Marcus Bristav
Guest
Posts: n/a
 
      04-13-2007
On 4/13/07, Francis Cianfrocca <(E-Mail Removed)> wrote:

> We're using it internally and it works quite well. Traps are not difficult
> to implement, but they do evil things to your network . The agent would
> need some documentation before a public release. Are you willing to help
> with that?
>


I can help with documentation. Keep in mind though that I'm still in
research mode so the speed won't be that great initially. But I've
heard only good things about Eventmachine so it will be exciting to
test it out and learn to use it. Maybe we can find more uses for it
here

/Marcus

 
Reply With Quote
 
Marcus Bristav
Guest
Posts: n/a
 
      04-14-2007
Ok. You can send me offlist to my address used here.

This sounds very interesting indeed. Thanks a lot

/Marcus

On 4/14/07, Francis Cianfrocca <(E-Mail Removed)> wrote:
> On 4/13/07, Marcus Bristav <(E-Mail Removed)> wrote:
> >
> > On 4/13/07, Francis Cianfrocca <(E-Mail Removed)> wrote:
> >
> > I can help with documentation. Keep in mind though that I'm still in
> > research mode so the speed won't be that great initially. But I've
> > heard only good things about Eventmachine so it will be exciting to
> > test it out and learn to use it. Maybe we can find more uses for it
> > here

>
>
>
> Ok, I refactored our app-specific MIB handling out and I have a
> functionally-complete SNMP agent (minus trap support). You have to add your
> own MIBs. Eventually we should have built-in support
> for the standard ones, as long as they are easily scriptable. Here's what
> your code would look like:
>
> #--------------------------------------------------------
> require "rubygems"
> require "eventmachine"
> require "net/snmp"
>
> require 'snmpagent'
> include EventMachine::SnmpAgent
>
> agnt = Agent.new :verbose=>true
>
> agnt.add_object [1,3,6,1,2,1,1,1,0], "baloney"
> agnt.add_object [1,3,6,1,2,1,1,3,0], proc {`cat
> /proc/uptime`.split.first.to_i * 100}
>
> agnt.run
> #--------------------------------------------------------
>
>
> You can test with snmpwalk or any "real" management system. This code has
> been tested against OpenView, Argent, SolarWinds, and some others. Obviously
> the example only adds two managed objects. In practice you would add your
> "real" objects in a Ruby module whose name you pass to
> EventMachine::SnmpAgent::Agent#new.
>
> If you're interested, I can send the library to your private email. If
> anyone else is interested, let me know here and I'll put a distro package on
> the EventMachine rubyforge page.
>
> The net/snmp library comes from the Net::LDAP library (on Rubyforge).
>


 
Reply With Quote
 
Brian Candler
Guest
Posts: n/a
 
      04-14-2007
On Sat, Apr 14, 2007 at 11:08:33PM +0900, Francis Cianfrocca wrote:
> agnt = Agent.new :verbose=>true
>
> agnt.add_object [1,3,6,1,2,1,1,1,0], "baloney"
> agnt.add_object [1,3,6,1,2,1,1,3,0], proc {`cat
> /proc/uptime`.split.first.to_i * 100}
>
> agnt.run

...
> If you're interested, I can send the library to your private email. If
> anyone else is interested, let me know here and I'll put a distro package on
> the EventMachine rubyforge page.


I'm interested.

Regards,

Brian.

 
Reply With Quote
 
Peņa, Botp
Guest
Posts: n/a
 
      04-16-2007
From: Francis Cianfrocca [(E-Mail Removed)]=20
# anyone else is interested, let me know here and I'll put a=20
# distro package on the EventMachine rubyforge page.

pls. thanks for eventmachine et al.
kind regards -botp

 
Reply With Quote
 
Matt Matson
Guest
Posts: n/a
 
      02-10-2008
Francis Cianfrocca wrote:
> On 4/13/07, Marcus Bristav <(E-Mail Removed)> wrote:
>> > I put some of the necessary SNMP protocol support in the Net::LDAP

>> /Marcus
>>
>>

>
> We're using it internally and it works quite well. Traps are not
> difficult
> to implement, but they do evil things to your network . The agent
> would
> need some documentation before a public release. Are you willing to help
> with that?
>
> Is there anyone else who would want to use such a thing?


I'm very interested in using / contributing to your agent code!
-m2matson
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
Francis Cianfrocca
Guest
Posts: n/a
 
      02-10-2008
[Note: parts of this message were removed to make it a legal post.]

On Feb 10, 2008 1:54 PM, Matt Matson <(E-Mail Removed)> wrote:

> Francis Cianfrocca wrote:
> > On 4/13/07, Marcus Bristav <(E-Mail Removed)> wrote:
> >> > I put some of the necessary SNMP protocol support in the Net::LDAP
> >> /Marcus
> >>
> >>

> >
> > We're using it internally and it works quite well. Traps are not
> > difficult
> > to implement, but they do evil things to your network . The agent
> > would
> > need some documentation before a public release. Are you willing to help
> > with that?
> >
> > Is there anyone else who would want to use such a thing?

>
> I'm very interested in using / contributing to your agent code!
> -m2matson
>




Take a look at the implementation in Ruby/EventMachine. The SNMP agent
skeleton is in a separate gem which you'll find on the Rubyforge
EventMachine project page. The test cases should show you how to use it.
It's pretty simple, actually.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SNMP module to query net-snmp milaus Perl Misc 3 08-31-2006 03:31 PM
Developing an SNMP agent in VC++ rajninathpatil@gmail.com Computer Support 2 03-29-2006 05:03 PM
restarting snmp-agent on a cisco? arnevt@sloeber.office.xs4all.be Cisco 2 01-13-2005 01:14 PM
SNMP Agent development Ofer Razon Perl 1 06-01-2004 09:49 PM
SNMP - Cisco - SNMP news.easynews.com Cisco 0 03-04-2004 10:44 PM



Advertisments