This error has been discussed before, but this seems to a different issue.
I've had this working before, but if done a reinstall and am now having problems.
Code: Select all
netra-svr:/etc/snmp# snmpwalk -v 2c -c public netra-svr .1.3.6.1.4.1.2021.255
UCD-SNMP-MIB::ucdavis.255 = No Such Instance currently exists at this OID
netra-svr:/etc/snmp# snmpget -v 2c -c public netra-svr .1.3.6.1.4.1.2021.255
UCD-SNMP-MIB::ucdavis.255 = No Such Instance currently exists at this OID
netra-svr:/etc/snmp#
I can run the script manually and it works:
Code: Select all
netra-svr:/usr/local/bin# ./fetch_mail_statistics.pl /var/log/mail.log /var/log/mailstats.db .1.3.6.1.4.1.2021.255 -n .1.3.6.1.4.1.2021.255
.1.3.6.1.4.1.2021.255.0
integer
0
if i use -g rather than -n when i manually run the script, is saves the value for what appears to be the time set in the script by the var $MINRESET
Code: Select all
netra-svr:/usr/local/bin# snmpwalk -v 2c -c public netra-svr .1.3.6.1.4.1.2021.255
UCD-SNMP-MIB::ucdavis.255 = No Such Instance currently exists at this OID
netra-svr:/usr/local/bin# ./fetch_mail_statistics.pl /var/log/mail.log /var/log/mailstats.db .1.3.6.1.4.1.2021.255 -g .1.3.6.1.4.1.2021.255
.1.3.6.1.4.1.2021.255.0
integer
0
netra-svr:/usr/local/bin# snmpwalk -v 2c -c public netra-svr .1.3.6.1.4.1.2021.255
UCD-SNMP-MIB::ucdavis.255.0 = INTEGER: 0
UCD-SNMP-MIB::ucdavis.255.1 = INTEGER: 0
UCD-SNMP-MIB::ucdavis.255.2 = INTEGER: 0
UCD-SNMP-MIB::ucdavis.255.3 = INTEGER: 0
UCD-SNMP-MIB::ucdavis.255.4 = INTEGER: 1
UCD-SNMP-MIB::ucdavis.255.5 = INTEGER: 0
UCD-SNMP-MIB::ucdavis.255.6 = INTEGER: 0
UCD-SNMP-MIB::ucdavis.255.7 = INTEGER: 0
UCD-SNMP-MIB::ucdavis.255.8 = INTEGER: 0
UCD-SNMP-MIB::ucdavis.255.9 = INTEGER: 0
UCD-SNMP-MIB::ucdavis.255.10 = INTEGER: 0
netra-svr:/usr/local/bin#
I can't seem to fault the config. I've done everything right (as far as i know), i haven't changed the values of the fetch_mail_statistics.pl script...
Does anyone have any idea's as to why snmp doesn't seem to be keeping the values? If you need more info, please ask....
Here's my config:
Linux netra-svr.network.athome 2.6.24-1-sparc64 #1 Thu May 8 17:12:30 UTC 2008 sparc64 GNU/Linux
Package: snmpd
Source: net-snmp
Version: 5.4.1~dfsg-7.1
snmpd.conf
Code: Select all
############### SNMPD Configuration ################
#####################################################
################ SECURITY ################
# sec.name source community
com2sec readonly default public
# sec.model sec.name
group MyROGroup v2c readonly
# incl/excl subtree mask
view all included .1 80
# context sec.model sec.level match read write notif
access MyROGroup "" any noauth exact all none none
################ GENERAL ################
syslocation Tob of Cabinet, Backroom
syscontact Chris <admin@network.athome>
#master agentx
################ MISC ################
pass .1.3.6.1.4.1.2021.255 /usr/local/bin/fetch_mail_statistics.pl /var/log/mail.log /var/log/mailstats.db .1.3.6.1.4.1.2021.255
perl srcipt location
Code: Select all
netra-svr:/usr/local/bin# ls
total 16K
drwxrwsr-x 2 root staff 4.0K 2008-06-12 23:43 .
drwxrwsr-x 10 root staff 4.0K 2008-05-28 19:03 ..
-rwxrwxrwx 1 root root 5.5K 2008-06-12 23:29 fetch_mail_statistics.pl
mailstats file
Code: Select all
netra-svr:/var/log# ls mailstats*
-rwxrwxrwx 1 root root 29 2008-06-12 23:30 mailstats.db