Bluehost.com Web Hosting $6.95

question concerning pass and exec

This is a discussion on question concerning pass and exec within the SNMP Users forums, part of the Networking and Network Related category; --===============0253857812== Content-Type: multipart/alternative; boundary="----=_Part_103562_24705066.1178031635156" ------=_Part_103562_24705066.1178031635156 Content-Type: text/plain; charset=ISO-8859-1; ...


Go Back   Usenet Forums > Networking and Network Related > SNMP Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-01-2007
Nicholas Ritter
 
Posts: n/a
Default question concerning pass and exec

--===============0253857812==
Content-Type: multipart/alternative;
boundary="----=_Part_103562_24705066.1178031635156"

------=_Part_103562_24705066.1178031635156
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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

------=_Part_103562_24705066.1178031635156
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

<div>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.
</div>
<div>&nbsp;</div>
<div>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?
</div>
<div>&nbsp;</div>
<div>pass .1.3.6.1.4.100.2 /usr/bin/perl /opt/watchmaillog/readcounters.pl spam <br>pass .1.3.6.1.4.100.4 /usr/bin/perl /opt/watchmaillog/readcounters.pl virus <br>pass .1.3.6.1.4.100.5 /usr/bin/perl&nbsp;/opt/watchmaillog/readcounters.pl mess_recv
<br>pass .1.3.6.1.4.100.6 /usr/bin/perl /opt/watchmaillog/readcounters.pl mess_sent <br>pass .1.3.6.1.4.100.7 /usr/bin/perl /opt/watchmaillog/readcounters.pl mess_relay <br>pass .1.3.6.1.4.100.8 /usr/bin/perl /opt/watchmaillog/readcounters.pl mess_waiting
<br>pass .1.3.6.1.4.100.9 /usr/bin/perl /opt/watchmaillog/readcounters.pl mess_rejected</div>
<div>&nbsp;</div>
<div>As noted above, I am trying to pass the results of &quot;readcounters.pl&quot; (which has a command arguement.) Is there something not correct here? The script &quot;readcounters.pl&quot; is set to ugo+rx</div>
<div>&nbsp;</div>
<div>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:</div>
<div>&nbsp;</div>
<div>/etc/snmp/snmpd.conf: line 99: Error: bad prefix match parameter &quot;0&quot;, should be: exact or prefix - installing anyway<br>/etc/snmp/snmpd.conf: line 100: Error: bad prefix match parameter &quot;0&quot;, should be: exact or prefix - installing anyway
<br>/etc/snmp/snmpd.conf: line 101: Error: bad prefix match parameter &quot;0&quot;, should be: exact or prefix - installing anyway</div>
<div>&nbsp;</div>
<div>But these entries are related to the following lines in the config file, which may or not be related to my problem:</div>
<div>&nbsp;</div>
<div>##&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; context sec.model sec.level prefix read&nbsp;&nbsp; write&nbsp; notif<br>access MyROGroup &quot;&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; any&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; noauth&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; all&nbsp;&nbsp;&nbsp; none&nbsp;&nbsp; none<br>access MyROGroup2 &quot;&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; any&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; noauth&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; all&nbsp;&nbsp;&nbsp; none&nbsp;&nbsp; none
<br>access MyROGroup3 &quot;&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; any&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; noauth&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; all&nbsp;&nbsp;&nbsp; none&nbsp;&nbsp; none</div>
<div>&nbsp;</div>
<div>Am I not setting up the snmpd daemon correctly?</div>
<div>&nbsp;</div>
<div>I am not seeing any sign that snmpd is even running the &quot;readcounters.pl&quot; script, and I am able to run the script manually and get the data I expect.</div>
<div>&nbsp;</div>
<div>I am having this same general problem with mrtg-mailstats:</div>
<div>&nbsp;</div>
<div>exec .1.3.6.1.4.100.10 msgsTOTAL /usr/bin/mrtg-mailstats -S total<br>exec .1.3.6.1.4.100.11 msgsFROM /usr/bin/mrtg-mailstats -S from<br>exec .1.3.6.1.4.100.12 msgsTO /usr/bin/mrtg-mailstats -S to<br>exec .1.3.6.1.4.100.13 msgsREJ /usr/bin/mrtg-mailstats -S rej
</div>

------=_Part_103562_24705066.1178031635156--


--===============0253857812==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-------------------------------------------------------------------------
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/
--===============0253857812==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/...net-snmp-users

--===============0253857812==--

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 06:51 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0