Distributor ID: Ubuntu Description: Ubuntu 16.04.2 LTS Release: 16.04 Codename: xenial
Installed snmpd snmptt snmp.
/ etc / default / snmpd
# This file controls the activity of snmpd # Don't load any MIBs by default. # You might comment this lines once you have the MIBs downloaded. export MIBS= # snmpd control (yes means start daemon). SNMPDRUN=yes # snmpd options (use syslog, close stdin/out/err). SNMPDOPTS='-Lsd -Lf /dev/null -u snmp -g snmp -I -smux,mteTrigger,mteTriggerConf -p /run/snmpd.pid' /etc/snmp/snmptt.ini
mode =daemon net_snmp_perl_enable = 1 log_file = /var/log/snmptt/snmptt.log log_enable = 1 unknown_trap_log_enable = 1 unknown_trap_log_file = /var/log/snmptt/snmpttunknown.log /etc/snmp/snmptrapd.conf
authCommunity log,execute,net public traphandle default snmptthandler Traps are not recorded at all, although they come by tcpdump.
If you run manually:
sudo service snmpd stop sudo snmptrapd -f -L o then everything is recorded. And also in the logs:
16:45:03 2017/04/18 SNMPTT v1.4 shutdown 16:45:03 2017/04/18 Total traps received=0,Total traps translated=0,Total traps ignored=0,Total unknown traps=0 16:45:04 2017/04/18 SNMPTT v1.4 started 16:45:04 2017/04/18 Loading /etc/snmp/snmptt.conf 16:45:04 2017/04/18 Finished loading 66 lines from /etc/snmp/snmptt.conf 16:45:04 2017/04/18 Loading 16:45:04 2017/04/18 Could not open configuration file: 16:45:04 2017/04/18 Changing to UID: snmptt (117) What am I doing wrong? Could not open configuration file: - tried to google, really did not find anything.