Re: Pass and snmpwalk problem

Nelson Vale <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Thanks Dave, 

Obviously this script is just a test script and does no validations...


But in snmpd.conf, should I put the OID like:

pass .1.3.6.1.2.1.1.1.0 /usr/bin/perl /tmp/teste.pl

or:

pass .1.3.6.1.2.1.1.1 /usr/bin/perl /tmp/teste.pl

I'm only trying to get the sysDescr object from a file in my system. Is
there a better way to do it?


Ter, 2007-04-17 às 13:24 +0100, Dave Shield escreveu:
> On 17/04/07, Nelson Vale <[email protected]> wrote:
> > The script that I'm using is aperl script like:
> >
> > #!/usr/bin/perl
> >
> > if($ARGV[0] eq "-g") {
> >         print "$ARGV[1]\n";
> >         print "string\n";
> >         print "1\n";
> > }
> > if($ARGV[0] eq "-n") {
> >         print "$ARGV[1]\n";
> >         print "string\n";
> >         print "9\n";
> > }
> 
> This script never bothers to look at the OID that it is
> being asked for, or to check whether this is actually
> valid.   So yes, you will get strange results.
> 
> In the case of a GET request ("-g"), you should
> only return a value if the requested OID is
> exactly the same as the OID that you're implementing.
> 
> In the case of a GETNEXT request ("-n"), you should
> only return a value if the requested OID is *less* than
> the OID that you're implementing.
>    And you should return this implemented OID, *not* the
> OID that you were originally given.
> 
> That's why the walk is getting confused.
> 
> Dave
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Net-snmp-users mailing list
> [email protected]
> Please see the following page to unsubscribe or change other options:
> https://lists.sourceforge.net/lists/listinfo/net-snmp-users
> 
-- 
Nelson Vale

Critical Links, S.A.
Parque Industrial de Taveiro, Lote 48
3045-504 Coimbra
PORTUGAL

Tel: +351.239989100
Fax: +351.239989119
Web: www.critical-links.com/
Email: [email protected]


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.