You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
C:\>jq -n --unbuffered -c '.record.source = "C:/var/log" + .record.source | .record.sourcetype = (.tag | ltrimstr("file.")) | .record' 2>&1
'.record.sourcetype' is not recognized as an internal or external command,
operable program or batch file.
Two potential ways to support CMD:
Would it be possible to change the single quotes into double quotes? Changing to double quotes seems to fix the issue for CMD, while not breaking it for bash. Top example is from CMD and bottom is from bash:
After investigating this more, it doesn't seem like Windows support is going to be as easy as changing the quote character. Would be really cool if this plugin could support Windows! The work around for Windows was to just use record_transformer.
Hello @Gimi!
Based on https://github.com/Gimi/fluent-plugin-jq/blob/master/lib/fluent/plugin/jq_mixin.rb#L34, it seems like
jq
is invoked with the filter surrounded by single quotes. This seems to be problematic when invoking on CMD.For example:
Two potential ways to support CMD:
Downside of this is that all double quotes would need to be escaped before invoking
IO.popen
Let me know if either of these two options look reasonable. I can submit a PR if you want.
Thanks!
The text was updated successfully, but these errors were encountered: