On 17/04/07, Nelson Vale wrote:
> Obviously this script is just a test script and does no validations...

OK - but then it won't work correctly.
If nothing else, the GETNEXT handling should return
the appropriate OID - not just echo the supplied one.

I'm not sure how robust the pass handler is - it would
tend to assume that the pass script is behaving itself.

> But in snmpd.conf, should I put the OID like:
> pass . /usr/bin/perl /tmp/teste.pl
> or:
> pass . /usr/bin/perl /tmp/teste.pl

Either would work - depending on how you write the
pass script. Registering the OID of the object is
better practise, since it means you can handle
SNMPv2 invalid instance requests correctly
(noSuchInstance rather than noSuchObject).

> I'm only trying to get the sysDescr object from a file in
> my system.

I presume you've disabled the standard sysDescr
processing first?

> Is there a better way to do it?

Not something I've looked at recently, but you could
try using the "override" token. Though that would
mean setting the value in the snmpd.conf file itself,
which probably isn't what you want.
(And could be done using the "sysdescr" token anyway).

The other possibility would be to tweak the relevant code
in 'agent/mibgroup/mibII/system_mib.c'


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.
Net-snmp-users mailing list
Please see the following page to unsubscribe or change other options: