I am trying to extend freeradius statistics to snmp. I want to monitor these values and collect them within rrd files. My problem is that these values should be rrd counter but it appears that counter values needs to retrieve an INTEGER and not a STRING. You can see in this snmpwalk that the value is returned as STRING.
snmpwalk -v2c -c public 127.0.0.1 .1.3.6.1.3.1983.1.1
# output
iso.3.6.1.3.1983.1.1.1.0 = INTEGER: 1
iso.3.6.1.3.1983.1.1.2.1.2.15.97.99.99.101.115.115.95.114.101.113.117.101.115.116.115 = STRING: "/bin/cat"
iso.3.6.1.3.1983.1.1.2.1.3.15.97.99.99.101.115.115.95.114.101.113.117.101.115.116.115 = STRING: "/var/log/freeradius/statistics/total_access_requests"
iso.3.6.1.3.1983.1.1.2.1.4.15.97.99.99.101.115.115.95.114.101.113.117.101.115.116.115 = ""
iso.3.6.1.3.1983.1.1.2.1.5.15.97.99.99.101.115.115.95.114.101.113.117.101.115.116.115 = INTEGER: 5
iso.3.6.1.3.1983.1.1.2.1.6.15.97.99.99.101.115.115.95.114.101.113.117.101.115.116.115 = INTEGER: 1
iso.3.6.1.3.1983.1.1.2.1.7.15.97.99.99.101.115.115.95.114.101.113.117.101.115.116.115 = INTEGER: 1
iso.3.6.1.3.1983.1.1.2.1.20.15.97.99.99.101.115.115.95.114.101.113.117.101.115.116.115 = INTEGER: 4
iso.3.6.1.3.1983.1.1.2.1.21.15.97.99.99.101.115.115.95.114.101.113.117.101.115.116.115 = INTEGER: 1
iso.3.6.1.3.1983.1.1.3.1.1.15.97.99.99.101.115.115.95.114.101.113.117.101.115.116.115 = STRING: "9566"
iso.3.6.1.3.1983.1.1.3.1.2.15.97.99.99.101.115.115.95.114.101.113.117.101.115.116.115 = STRING: "9566"
iso.3.6.1.3.1983.1.1.3.1.3.15.97.99.99.101.115.115.95.114.101.113.117.101.115.116.115 = INTEGER: 1
iso.3.6.1.3.1983.1.1.3.1.4.15.97.99.99.101.115.115.95.114.101.113.117.101.115.116.115 = INTEGER: 0
iso.3.6.1.3.1983.1.1.4.1.2.15.97.99.99.101.115.115.95.114.101.113.117.101.115.116.115.1 = STRING: "9566"
# /etc/snmp/snmpd.conf
extend .1.3.6.1.3.1983.1.1 access_requests /bin/cat /var/log/freeradius/statistics/total_access_requests
The snmp script is extended by printing the value within the file. The file that are used by /bin/cat are generated by the the script /usr/local/sbin/radstat.sh
How do I make this output become an INTEGER?
iso.3.6.1.3.1983.1.1.4.1.2.15.97.99.99.101.115.115.95.114.101.113.117.101.115.116.115.1 = STRING: "9566"
Thanks Dominick