-
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
Send metrics to specific outputs #809
Comments
And what about to be able to select which input send data to which outputs ?
|
That approach would hopefully be applicable to all types of inputs and outputs. It would be a breaking change but well worth the disruption to make telegraf a lot more flexible, allowing you to 'wire-up' inputs to outputs, rather like Node-Red does visually. |
Sending inputs to specific outputs sounds like a useful feature, but there is a way of doing this already using measurement name filtering: [[inputs.exec]]
command = "/usr/local/bin/my5minutescript.sh"
interval = "5m"
data_format = "influx"
name_suffix = "_default"
[[inputs.exec]]
command = "/usr/local/bin/my5secondcript.sh"
interval = "5s"
data_format = "influx"
name_suffix = "_5days"
[[outputs.influxdb]]
urls = ["http://localhost:8086"]
database = "telegraf"
retention_policy = "default"
precision = "s"
namepass = ["*_default"]
[[outputs.influxdb]]
urls = ["http://localhost:8086"]
database = "telegraf2"
retention_policy = "5days"
precision = "ns"
namepass = ["*_5days"] |
@sparrc this is really nice :) |
note that you could also do this using custom tags and tagpass/tagdrop |
I'm going to close this because using namepass/tagpass is sufficient to accomplish this |
So if my measurement names are unique, I can use namepass on the influxdb output instance I want to use to get it to write the line to influxdb? E.g. My script produces lines like:-
My outputs could be configured like this:-
|
yes, exactly |
First problem:
Also, the time precision isn't being respected - as per my previous issue #761 , whatever the precision specified, it always uses "ns". However, the good news is that the measurements are being written to the right databases albeit with the default rp and ns precision. |
Retention policy isnt available until 0.11, if you have an issue its best to open an issue rather than commenting on a closed issue |
Hi Guys, Any chance you can consider reopening this issue? Hope it makes sense.. |
@chenl87 There is a similar issue open with a comment that shows a way to accomplish this sort of routing #1778 (comment) |
It would be very useful to be able to output exec inputs to different Influxdb databases with differing retention policies and precisions. e.g.
The text was updated successfully, but these errors were encountered: