<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>SNMP authentication for plugins</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>I'm in the process of writing a few plugins in perl that use Net::SNMP to monitor certain elements of the net-snmpd host resources mib and possibly some custom scripted mibs. One thing I've noticed is that all the snmp-related scripts use SNMP v1 or v2c for getting data from the clients - which is why I am re-writing them. I want to use SNMP v3, especially using the 'snmpkey' script that comes with the Net::SNMP perl module. (FYI: I can't get SNMP::Session to compile on Solaris 9)</FONT></P>

<P><FONT SIZE=2>With SNMP v3, it's not very wise to put authpassword and privpassword data on the command line of a check script. Right now I have my authentication info embedded in the script. However, if I plan to share my scripts with the community, there has to be a simpler method for authentication - no 'end-user' (including myself) wants to edit every check script for authentication.</FONT></P>

<P><FONT SIZE=2>I propose one of two solutions:</FONT>
</P>

<P><FONT SIZE=2>Easy - create an snmpauth.pm module to put in the libexec dir. It contains only simple constructor that creates a Net::SNMP->session object with the authentication info embedded in it. I will only be used by modules that need it.</FONT></P>

<P><FONT SIZE=2>Hard - modify utils.pm to include a similar constructor, but reads authentication info from some config file. Obviously if Net::SNMP isn't present this sub shouldn't cause the utils module to barf.</FONT></P>

<P><FONT SIZE=2>However, the whole reason I'm posting this to the list is to solicit opinions or hear other people's solutions (including ones I might have missed already included in docs / plugins).</FONT></P>

<P><FONT SIZE=2>P.S. I'm using the netsaint 1.2.9-4 plugins because I couldn't get the autoconf/autoheader/automake/configure/make thing working on Solaris 9 with Sun's SFW crap. However, I have been reading the documentation and source for the 1.3-beta1 plugins for tips and coding conventions.</FONT></P>

<P><FONT SIZE=2>--</FONT>
<BR><FONT SIZE=2>"Computer science is as much about computers as</FONT>
<BR><FONT SIZE=2>        astronomy is about telescopes" -- Edsger Dijkstra</FONT>
<BR><FONT SIZE=2>---------------------------------------------------------</FONT>
<BR><FONT SIZE=2>Anthony Tonns, UNIX Administrator - atonns@mail.ivillage.com</FONT>
</P>

</BODY>
</HTML>