В Mon, 12 Jan 2015 15:46:36 +0100 "Carlos E. R." <robin.listas@telefonica.net> пишет:
On 2015-01-12 14:13, Andrei Borzenkov wrote:
On Mon, Jan 12, 2015 at 3:54 PM, Carlos E. R. <> wrote:
I simply have:
authCommunity log,execute,net public authCommunity log,execute,net private
I thought that would write things to the log.
No, it simply enables snmptrapd to perform selected actions for selected community strings. How exactly it performs these actions is defined by other options.
As I have no idea what strings the router may send (the documentation doesn't say), I can't write any action.
"action" includes logging here.
The log is created (/var/log/net-snmpd.log) but is empty. I noticed a packet coming, I saw it on the firewall log.
Yes, my experience with net-snmp is that it logs not that much by default. You may need to tweak logging options. But I must admit configuring net-snmp is not for the faint of heart ... :)
It logs nothing...
I got that configuration from the "tutorial" here:
http://www.net-snmp.org/wiki/index.php/TUT:Configuring_snmptrapd
where it says "By default, it will simply log all incoming notifications via syslog."
But it does not, apparently.
It does but see below.
└─4580 /usr/sbin/snmptrapd -A -LF n /var/log/net-snmpd.log -p /var/run/snmptrapd.pid
-LF n will limit output to messages of notice or higher priority and apparently snmptrapd logs incoming traps at info priority. Of course it is not documented anywhere.