I have indeed thought about it but I was a little bit afraid of it because of the snmpd.conf(5) manual page :
Warning: though embedded perl is working, not much functionality has been implemented yet and thus writing mib module pieces for the agent within perl is not trivial at this point. It should get better in future releases.
It also says:
Look for improved support in future releases. Comments on how this looks as an architecture are certainly appreciated now.
i.e. use it, give feedback and complain (or, better, fix :-)) if something's broken.
Besides a slight memory leak (see bug 1009927), embedded per support in snmpd works quite well for me. Also, you can make a generic perl script that automatically works as a subagent or embedded perl, depending on what's available. See Wes' example for details:
http://www.net-snmp.org/tutorial-5/toolkit/perl/perl_module.pl
Furthermore, as far as I understood the "perl" statement, it allows to run one perl line, and my script is about 900 lines. Of course I can use multiple statements, but having a perl script inside a configuration file is not very clean, IMHO.
No need to put the script into snmpd.conf. Rather, have it referenced/called from there. As the snmpd.conf(5) man page says:
Sourcing an external file:
perl 'do /path/to/file.pl';
+Thomas
-- Thomas Anders (thomas.anders at blue-cable.de)
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.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