question concerning pass and exec

"Nicholas Ritter" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
I am running a Redhat Enterprise based system with the distro detfault
implementation of net-snmp-5.1.2. I have modified the snmpd.conf so as to be
able to remotely poll the server for information, which is working
wonderfully.

My problem is that I have added a number of exec and pass directives to
snmpd.conf that don't seem to be working. I constantly get nosuch name erros
on the remote end when running snmpget and snmpwalks. For the scripts/apps
that I have in the pass and exec statements, do they need to be in specific
places on the file system and with specific permissions?

pass .1.3.6.1.4.100.2 /usr/bin/perl /opt/watchmaillog/readcounters.pl spam
pass .1.3.6.1.4.100.4 /usr/bin/perl /opt/watchmaillog/readcounters.pl virus
pass .1.3.6.1.4.100.5 /usr/bin/perl /opt/watchmaillog/readcounters.pl
mess_recv
pass .1.3.6.1.4.100.6 /usr/bin/perl /opt/watchmaillog/readcounters.pl
mess_sent
pass .1.3.6.1.4.100.7 /usr/bin/perl /opt/watchmaillog/readcounters.pl
mess_relay
pass .1.3.6.1.4.100.8 /usr/bin/perl /opt/watchmaillog/readcounters.pl
mess_waiting
pass .1.3.6.1.4.100.9 /usr/bin/perl /opt/watchmaillog/readcounters.pl
mess_rejected

As noted above, I am trying to pass the results of "readcounters.pl" (which
has a command arguement.) Is there something not correct here? The script "
readcounters.pl" is set to ugo+rx

The snmpd log on the system shows that I am requesting the OIDs, but nothing
more. I do have 3 errors in the snmpd conf file:

/etc/snmp/snmpd.conf: line 99: Error: bad prefix match parameter "0", should
be: exact or prefix - installing anyway
/etc/snmp/snmpd.conf: line 100: Error: bad prefix match parameter "0",
should be: exact or prefix - installing anyway
/etc/snmp/snmpd.conf: line 101: Error: bad prefix match parameter "0",
should be: exact or prefix - installing anyway

But these entries are related to the following lines in the config file,
which may or not be related to my problem:

##                context sec.model sec.level prefix read   write  notif
access MyROGroup ""      any       noauth    0      all    none   none
access MyROGroup2 ""      any       noauth    0      all    none   none
access MyROGroup3 ""      any       noauth    0      all    none   none

Am I not setting up the snmpd daemon correctly?

I am not seeing any sign that snmpd is even running the "readcounters.pl"
script, and I am able to run the script manually and get the data I expect.

I am having this same general problem with mrtg-mailstats:

exec .1.3.6.1.4.100.10 msgsTOTAL /usr/bin/mrtg-mailstats -S total
exec .1.3.6.1.4.100.11 msgsFROM /usr/bin/mrtg-mailstats -S from
exec .1.3.6.1.4.100.12 msgsTO /usr/bin/mrtg-mailstats -S to
exec .1.3.6.1.4.100.13 msgsREJ /usr/bin/mrtg-mailstats -S rej

-------------------------------------------------------------------------
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.