OT: snmpwalk output format query
Jay R. Ashworth
jra at baylink.com
Sun Jun 8 16:44:30 CEST 2008
On Wed, Jun 04, 2008 at 04:17:32PM -0500, Ford, Andy wrote:
> Here's some real basic Perl to get you started:
>
> #!/usr/bin/perl
> use warnings;
> use strict;
>
> my @names = `snmpwalk -v2c -cpublic localhost system`;
> my @numbers = `snmpwalk -On -v2c -cpublic localhost system`;
>
> foreach my $i (0..$#names) {
> print "$names[$i] $numbers[$i]\n\n";
> }
Apparently, it's slightly too basic... or my switch is pretty stupid. :-)
As I had wondered might happen, those two commands apparently do not
enumerate deterministically the same (though I can't see why they
wouldn't...); the MIB items slip out of sync by the end. It's a start
though, and I have a perl guy in house.
Thanks again.
Cheers,
-- jra
--
Jay R. Ashworth Baylink jra at baylink.com
Designer The Things I Think RFC 2100
Ashworth & Associates http://baylink.pitas.com '87 e24
St Petersburg FL USA http://photo.imageinc.us +1 727 647 1274
Those who cast the vote decide nothing.
Those who count the vote decide everything.
-- (Joseph Stalin)
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list