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; ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
--===============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> </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> </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 /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> </div> <div>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</div> <div> </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> </div> <div>/etc/snmp/snmpd.conf: line 99: Error: bad prefix match parameter "0", should be: exact or prefix - installing anyway<br>/etc/snmp/snmpd.conf: line 100: Error: bad prefix match parameter "0", should be: exact or prefix - installing anyway <br>/etc/snmp/snmpd.conf: line 101: Error: bad prefix match parameter "0", should be: exact or prefix - installing anyway</div> <div> </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> </div> <div>## & nbsp; context sec.model sec.level prefix read write notif<br>access MyROGroup "" any noauth 0 all none none<br>access MyROGroup2 "" any noauth 0 all none none <br>access MyROGroup3 "" any noauth 0 all none none</div> <div> </div> <div>Am I not setting up the snmpd daemon correctly?</div> <div> </div> <div>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.</div> <div> </div> <div>I am having this same general problem with mrtg-mailstats:</div> <div> </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==-- |