Net::SNMP - Newbie Help

R

Rob

Hi All,

Please help!

I am in need of a perl script utilizing Net::SNMP to poll a router or
routers for various statistics and hope someone out there can help me
as I am useless and new to the perl world.

I want to have a text file with various hosts/community-strings/OIDs
which the perl script will read then run the polls against the text
file and put the results into variables or to another text file.

I understand the opening and closing of files and reading them but
when it comes to using the Net::SNMP sections and placing the output
into variables gets my stomach churning.

Any help will be extremely appreciated and thanks in advance.

Rob
 
S

Sherm Pendley

Rob said:
I understand the opening and closing of files and reading them but
when it comes to using the Net::SNMP sections and placing the output
into variables gets my stomach churning.

For the churning, I recommend Pepcid AC - great stuff. :)

As for your Perl code - what have you tried? What were the results, and
how were they different from those you expected?

sherm--
 
R

RobO

Sherm,

Thanks for your reply,

I popped out to the shops .....lets see if this Pepcid helps.... :)

Its not so much what I've tried its what I am trying to do and at the
same time learn a bit.

I want to query several routers for cpu usage,mem usage etc using
Net::SNMP and outputting those results into variables or text files.
These results I then want to take and use the RRD module to output
these stats to the rrd database for graphing.

I will be happy to just get some advice setting up a simple (for you
not me) perl script using Net::SNMP to query a device and output the
result.
From what I have seen on the web it appears perl is the tool of
choice......(there goes the stomach again) and both modules are used
for this purpose.
My main concern is with the Net::SNMP side of things as the online docs
dont explain it in newbie terms.

I have used simple bash scripts to poll routers however I am sure a lot
of the functionality is not there to utilise.

Thanks again,

Rob
 
S

Sherm Pendley

RobO said:
My main concern is with the Net::SNMP side of things as the online docs
dont explain it in newbie terms.

Well... the docs for the Net::SNMP module aren't meant to be an
introduction to the Perl language. There are other docs for that. For
instance, if it's the use of objects & methods that's causing your
heartburn, you might want to have a look at these perldocs:

perltoot
perlboot
perltooc

Whereas, if you're having trouble getting your head (and stomach) around
complex nested data structures, have a look at:

perlreftut
perldsc
perllol

Or, if it's regexes:

perlrequick
perlretut
perlre

So once again, it gets back to the question - what terms are you having
difficulty with?

sherm--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top