I'm running on Solaris 8 and 10, but I don't think
platform is relevant.
I've already submitted one bug report about -D turning
off the default syslogging of traps. However, now
that I've trudged through the code some more, I have
more to report.
1. The ONLY way for traps to get to the syslog appears
to be "by default" (i.e. there is no explicit way to
send them there). This wouldn't be so bad if there
weren't several things that will prevent the default
logging from being setup:
- -D (as described previously)
- -L (at least I wasn't able to find a combination of
settings that would do the trick)
- AgentX (i.e. if snmptrapd is able to connect to a
master agent, it logs some messages, which turns on
stderr logging by default:
No log handling enabled - turning on stderr logging
NET-SNMP version 5.3.0.1 AgentX subagent connected
registering pdu failed: 263!
...
2. There _appear_ to be 2 places in snmptrapd.c where
the default syslogging is turned on (near lines 950
and 1090). From testing, it appears that only the
stuff around line 950 (setting up syslog_handler) logs
traps.
Issue #1 is clearly something that needs to be fixed.
Perhaps the code could be moved earlier (e.g. before
the subagent_init() call)? I still don't understand
though whether -L should be able to send traps to the
syslog.
Logged In: YES
user_id=88893
Originator: NO
The option -Lsd should activate syslog-based logging.