-
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
Allow users to specify outputs as lists #370
Conversation
This will not be a breaking change after all, with this change, Telegraf will assign identifiers to the names of the outputs, so the Telegraf output will look something like this (with the above config):
The numbers are guaranteed to be based on the order they appear in the config file. The previous config file convention of specifying a single output for each name will still be supported, each output will get an ID of cc @pauldix @dswarbrick @daviesalex @sebito91 please review |
also note that the above IDs are pretty much just for logging & internal telegraf purposes, they don't show up in the database and all regular tags still apply |
Also this config would still work:
both outputs would get id==0
|
err = c.parseOutput(outputName, outputSubtbl) | ||
if err != nil { | ||
return nil, err | ||
switch outputSubtbl := outputVal.(type) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nit, outputSubtbl
feels awkward (same with tbl
in the rest of this function, but that's out of scope). outputSubTbl
or even outputSubTable
would be more readable.
LGTM, excited for this feature! |
for id, t := range outputSubtbl { | ||
err = c.parseOutput(outputName, t, id) | ||
if err != nil { | ||
return nil, err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto here re: unable to parse messaging.
My comments are out of order above, but basically all LGTM save adding some debug code to understand which output failed to parse. |
This will provide the ability to specify multiple outputs for a single type of output. In essence, allowing this: [outputs] [[outputs.influxdb]] urls = ["udp://localhost:8089"] database = "udp-telegraf" [[outputs.influxdb]] urls = ["http://myhost:8086"] database = "telegraf" [[outputs.kafka]] brokers = ["192.168.99.100:9092"] topic = "telegraf" closes #335
@sebito91 @gunnaraasen Thanks for your input, this is now in master and will be available in 0.2.1 |
@sparrc, thank YOU! |
This will provide the ability to specify multiple outputs for a single
type of output.
In essence, allowing this:
closes #335