On 05/11/2007, <[EMAIL PROTECTED]> wrote:
> I have called init_snmp("example_subagent") in my subagent daemon code,
> and created a example_subagent.conf under /user/local/shared/snmp.

Yes - that should work.


>                                                                   When I run
> the subagent daemon, I got error messages of the following:
> /usr/local/share/snmp/example_subagent.conf: line 1:

So it is indeed reading that config file.

> /usr/local/share/snmp/example_subagent.conf: line 1:
>      Warning: Unknown token: mibdirs.
> /usr/local/share/snmp/example_subagent.conf: line 2:
>      Warning: Unknown token: mibs.

Ah - these particular tokens are *library* directives, rather than
application-specific directives.   That means they would usually
be included in the common file 'snmp.conf'

  It is possible to include library directives within an application
config file, but they need to be explicitly marked as a library
section.

Try
     [snmp]
     mibdirs +/home/she/snmpdemo/subagent/mibs
     mibs ALL


     mibdirs ....
     mibs  ....


Though a typical agent (or subagent) wouldn't normally need the MIB files
to be loaded, since all that information is typically hardcoded into the
agent itself.

Dave

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
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

Reply via email to