OpenWrt/SNMP

From Wiki
/etc/config/snmpd
config agent
	option agentaddress UDP:161

config com2sec public
	option secname ro
	option source default
	option community public

#config com2sec private
#	option secname rw
#	option source localhost
#	option community private

config group public_v1
	option group public
	option version v1
	option secname ro

#config group public_v2c
#	option group public
#	option version v2c
#	option secname ro

#config group public_usm
#	option group public
#	option version usm
#	option secname ro

#config group private_v1
#	option group private
#	option version v1
#	option secname rw
#
#config group private_v2c
#	option group private
#	option version v2c
#	option secname rw
#
#config group private_usm
#	option group private
#	option version usm
#	option secname rw

config view publicview
	option viewname publicview
	option type included
	option oid .1.3.6.1.4.1.2021.8
#	option oid .1.3.6.1.2.1.1

#config view publicview
#	option viewname publicview
#	option type included
#	option oid .1.3.6.1.2.1.1

config access public_access
	option group public
	option context none
	option version any
	option level noauth
	option prefix exact
	option read publicview
	option write none
	option notify none

#config access private_access
#	option group private
#	option context none
#	option version any
#	option level noauth
#	option prefix exact
#	option read all
#	option write all
#	option notify all

config system
	option sysLocation	''
	option sysContact	''
	option sysName		'AlarmClock'
#	option sysServices	72
#	option sysDescr		''
#	option sysObjectID	''

#config exec
#	option name	filedescriptors
#	option prog	/bin/cat
#	option args	/proc/sys/fs/file-nr
#	option miboid	1.2.3.4

config exec
	option name	Arduino_Var1
	option prog	/bin/cat
	option args	/tmp/snmp_variable1
	
config exec
	option name	Arduino_Var2
	option prog	/bin/cat
	option args	/tmp/snmp_variable2
	
config exec
	option name 	Arduino_Var3
	option prog	/bin/cat
	option args	/tmp/snmp_variable3