Add new attribute raw_options to td_agent_source#123
Add new attribute raw_options to td_agent_source#123opan wants to merge 3 commits intotreasure-data:masterfrom
raw_options to td_agent_source#123Conversation
| end | ||
| ``` | ||
|
|
||
| Use attribute `_raw_options` for attribute that using value such as `Array` or `Hash`. For example when you using [FluentD systemd plugin](https://github.com/reevoo/fluent-plugin-systemd). |
There was a problem hiding this comment.
For consistency, please use fluentd or Fluentd, not FluentD
| type 'systemd' | ||
| tag 'journalctl' | ||
| parameters( | ||
| matches: [{"_SYSTEMD_UNIT": "syslog.service"}] |
There was a problem hiding this comment.
Honestly speaking, I'm skeptical if this is so useful. If I understand the situation correctly, just passing the parameter as a String must be sufficient for that purpose.
td_agent_source 'tail_journalctl' do
( ... )
parameters(
matches: ::JSON.generate([{"_SYSTEMD_UNIT": "syslog.service"}])
read_from_head: true
)
endI know the TdAgent::Helpers.params_to_text isn't well implemented, but this change would make the situation more complicated with very few actual benefit, I think 🤔
There was a problem hiding this comment.
Hi, @yyuu thanks for reviewing my PR. I will try your approach and will tell you soon if this works on my case.
There was a problem hiding this comment.
Hi, @yyuu so I've been thinking about your approach. But I found a problem when using this method. How can user set this attributes from nodes.json files where we can't use ruby code? This will be okay if the user set the attribute directly in attributes files.
Thanks in advance.
Add capabilities to add an attribute with raw values. This cases will be useful for a plugin like this. The
matchesattribute, need to receive either[]or{}value.