Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FluentD debug tracing #26

Closed
ChrisHeitkamp opened this issue Feb 18, 2016 · 4 comments
Closed

FluentD debug tracing #26

ChrisHeitkamp opened this issue Feb 18, 2016 · 4 comments

Comments

@ChrisHeitkamp
Copy link

No real issue, but rather a CR:
It would be good if the omsagent / fluentd call could have debug parameters passed (-vv) when service_control is called with a debug level.

START_QUALS="-d $PIDFILE --no-supervisor -o $LOGFILE -vv" <<

And my question:
Even with -vv I do not get plugin tracing information.
Looking for lines like
log.debug "Success sending #{tag} x #{count} in #{time.round(2)}s"
from the out_oms plugin.
Any hints?

@jeffaco
Copy link
Contributor

jeffaco commented Feb 19, 2016

While it's not difficult modifying service_control to take a debug level, note that the various mechanisms used to start across various systems (be it /etc/inid.d style scripts or systemd control) do not necessarily take a parameter. I could set something globally and detect at startup, but that seems kind of sloppy to me.

As for the -vv option to fluentd, we're using the fluentd framework, and we're checking for debug of our particular plugin. Debugging globally (what -vv does) doesn't appear to set individual plugins to debug, which is why that's happening.

Given what you're after, I think it's easier just to change the configuration to debug our plugin.

Hope this helps,

/Jeff

@niroyb
Copy link
Contributor

niroyb commented Feb 19, 2016

To answer the second part of the question, there are two types of log levels in fluentd:

  1. The global logging level controlled on invocation with the -v or -vv flags affects $log.
  2. The per plugging logging level controlled by the log_level tag in the configuration script affects @log.

In this case per plugin logging is used. Change the log_level of the output plugin to debug. The configuration file is located in /etc/opt/microsoft/omsagent/conf/omsagent.conf
Additional documentation can be found here : http://docs.fluentd.org/articles/logging#per-plugin-log

@jeffaco
Copy link
Contributor

jeffaco commented Feb 19, 2016

@ChrisHeitkamp, have we answered your questions? If so, please feel free to close this issue. If not, please post a new comment and we'll help you out.

@ChrisHeitkamp
Copy link
Author

@jeffaco @niroyb, thanks, this was the information I needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants