I want to log messages from my Snmptrapd to a logfile, but my deamon don't understands the logOption token?
I try to use this line in my configuration (/etc/snmp/snmptrapd.conf):
logOption -f "/var/log/snmptrapd.log"
But I get this warning:
/etc/snmp/snmptrapd.conf: line 3: Warning: Unknown token: logOption
Does anyone know which option is valid? And how to log to an external file (and not the syslog).
I am using NET-SNMP Version: 5.7.3 and Ubuntu version 18.04.3.
Thank you for your help!
I'm late to this party, but I ran into this today and thought I'd throw my two cents in. According to some posts I've read, this is because "logOption" is called by another library (in this case, "snmp") which needs to be specified in the config file. The man pages make no mention of this, but it should look like this in /etc/snmp/snmptrapd.conf:
Hopefully that helps someone else.