So I've made a little headway into this. Thought I would post an update as it
may help others in the future.
Starting off referencing this bug report:
https://sourceforge.net/p/net-snmp/bugs/2610/
I can confirm that only d,i,7,6 produce any output in the logs. All other
priorities do nothing.
I do not see any difference between LOG_INFO and LOG_DEBUG.
I mean LOG_DEBUG should be reporting all the steps.
With a really simple snmptrapd.conf file:
disableAuthorization yes
traphandle default /usr/sbin/snmptthandler
It should at least log that it's executing /usr/sbin/snmptthandler for the trap
received.
I've done a lot of troubleshooting of recent and it's clear that a lot is going
on with snmptrapd which would be very useful if reported in debug logging.
Does anyone else have the same feelings about this?
From: troy_...@hotmail.com
To: net-snmp-users@lists.sourceforge.net
Subject: Clarification on logOption in snmptrapd.conf
Date: Wed, 25 Mar 2015 14:21:58 +1100
I've been playing with the logOption directive for snmptrapd.conf.
When I specify it this way:
logOption f /var/log/snmptrapd.log
I do get traps logged in this file.
However what level of logging is this? Is it just LOG_NOTICE?
Reading the MAN page:
http://www.net-snmp.org/docs/man/snmpcmd.html
Normal output is (or will be!) logged at a priority level of
LOG_NOTICE
But this text seems to follow after the uppercase F option which is for
specifying priorities.
"For
-LF
and
-LS
the priority specification comes before the file or facility token"
So I've tried this:
logOption F d /var/log/snmptrapd.log
or
logOption F 7 /var/log/snmptrapd.log
Which still logs in /var/log/messages.
logOption Fd /var/log/snmptrapd.log
or
logOption F7 /var/log/snmptrapd.log
or
logOption F 0-7 /var/log/snmptrapd.log
Which still logs in /var/log/messages.
logOption F d/var/log/snmptrapd.log
or
logOption F 7/var/log/snmptrapd.log
Which still logs in /var/log/messages.
logOption F pd /var/log/snmptrapd.log
or
logOption F p7 /var/log/snmptrapd.log
Results in "Starting snmptrapd: invalid priority: p"
logOption d F /var/log/snmptrapd.log
or
logOption 7 F /var/log/snmptrapd.log
Results in "Starting snmptrapd: Unknown logging option passed to -L: d." or
"Starting snmptrapd: Unknown logging option passed to -L: 7."
So I am pretty confused.
My goal is to have debug logging to a separate file.
I also want to be able to specify it in the snmptrapd.conf file.
Thanks in advance for all replies.
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users