-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Enable debug logging on a per-plugin basis #6584
Comments
Setting Since this sounds like a config issue, maybe posting your config and asking over at the InfluxData Community site will yield some results. |
@glinton That's helpful, thanks. My immediate issue has been mostly resolved through a combination of trial-and-error and code spelunking (you're correct, it was a config issue; the TOML bracket syntax caught me out and I was using I think that the lack of debugging output I was hoping to see (but didn't) is, as you say, the result of plugins not printing any debug information. Would PRs adding additional debugging output to plugins be welcome if I find them useful to fix any future issues? Thinking more broadly, would it be worth adding a note in CONTRIBUTING.md explaining how the debug setting applies to plugins and perhaps encouraging authors to add relevant messages? |
It would be helpful to add the least amount of debug logs required to debug an issue, but I'm not sure what our "official" stance is, @danielnelson can say better when he's back in. |
We would have to evaluate logging on a case by case basis, its one of those somewhat subjective things where you don't want to little or too much. Logging every modification by the plugin would be too much though. It might also be helpful to use the On the particular error you ran into, it needs to be fixed in the configuration loading, as it's not a plugin level error, and it is #6474. Back on the subject of per plugin logging level, I would like to add this. The way I'm thinking to do it would be to deprecate the [agent]
# default log level
loglevel = "info"
[[inputs.cpu]]
# overrides the log level for this plugin
loglevel = "debug" |
danielnelson - I agree, that's a good way to go. On Windows debug should get sent to eventlog as info, because currently if you're using eventlog debug level messages are dropped. I agree with lhanson that guidelines in CONTRIBUTING.md would be helpful, because right now using inputs.win_perf_counters and inputs.exec they're both completely silent and all I see is outputs.influxdb writing data. The problem I have is missing data, without any debug from the inputs I can't find out why sometimes it goes missing on every 7th poll (70 seconds). The output appears to write all the data it has. |
I'd like to second the original feature request. |
Hi @danielnelson. Is this per-plugin debug logging (rather than global) still planned/on the roadmap? This would be really useful in cases where say there is a ping plugin and snmp plugin for a specific host - In normal circumstances, It would only make sense to enable the debug on the ping plugin to indicate in the logs that the host was down and suppress all the (potentially extensive) errors from the snmp plugin that would inevitably occur if the host was down anyway. Thanks! |
Feature Request
I'd like to be able to see debug logging for specific plugins I'm using rather than simply for the top-level agent.
Proposal:
Allow the
[agent]
level "debug" configuration value to be applied on a per-plugin basis.Current behavior:
Enabling
debug = true
at the[agent]
level only emits high-level debug output.Desired behavior:
Allow
debug = true
to be set for individual plugins I've defined, which then log specific actions they are or are not taking as they run.Use case:
I can't figure out why I can't seem to use
[[processors.rename.replace]]
to replace fields based on a specific tag; all subsequent series are apparently affected regardless oftagpass
values I'm trying to use. It would be helpful to have verbose logging to ascertain how inputs are being processed by my current configuration so I can determine what I'm doing wrong.The text was updated successfully, but these errors were encountered: