SNMP daemon does not start

Hi,

I am trying to use net-snmp package , i tried master and 20.02 packages , SNMPd does not seem to start. The reason seems to be snmpd.conf is empty.

When i start it manually it says Run snmpconf -g basic_setup , i guess it is not an option in openwrt?

is there a bug in the snmp.init that is preventing the snmpd.conf getting generated ? looks like the

> service snmpd start

does not work.

any suggestions on this will be helpful, please.

Thanks!

uci export snmpd
head -n -0 /etc/snmp/snmpd.conf
netstat -lnp | grep 161
/etc/init.d/snmpd enable; /etc/init.d/snmpd restart; sleep 10; logread -e snmp

Hi ,

Thanks!

# uci export snmpd
package snmpd

config agent
        option agentaddress 'UDP:161,UDP6:161'

config agentx
        option agentxsocket '/var/run/agentx.sock'

config com2sec 'public'
        option secname 'ro'
        option source 'default'
        option community 'SNMP-wifi_stats'

config com2sec 'private'
        option secname 'rw'
        option source 'localhost'
        option community 'SNMP-wifi_debug'

config com2sec6 'public6'
        option secname 'ro'
        option source 'default'
        option community 'public'

config com2sec6 'private6'
        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 'all'
        option viewname 'all'
        option type 'included'
        option oid '.1'

config access 'public_access'
        option group 'public'
        option context 'none'
        option version 'any'
        option level 'noauth'
        option prefix 'exact'
        option read 'all'
        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 user 'MD5DESUser'
        option name 'SNMP-wifi_admin'
        option type 'rw'
        option auth 'MD5'
        option authpass 'wifi SNMP'
        option encryption 'DES'

config system
        option sysLocation 'Ceiling Unit'
        option sysContact 'info'
        option sysName 'Wifi Sys'

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

config engineid
        option engineidtype '3'
        option engineidnic 'eth0'

config snmpd 'general'
        option enabled '0'

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

~# head -n -0 /etc/snmp/snmpd.conf
head: /etc/snmp/snmpd.conf: No such file or directory
~# netstat -lnp | grep 161
~# /etc/init.d/snmpd enable; /etc/init.d/snmpd restart; sleep 10;

no logs in /var/log/messages with snmp , logread returns empty

You forgot to enable it.

1 Like

oops! Thanks!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.