OT: snmpwalk output format query

Jay R. Ashworth jra at baylink.com
Thu Jun 5 15:11:28 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";
> }

See what happens when you're not a perl guy?  Thanks a bunch, Andy.

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