Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Routing metrics by plugin #1778
Add the possibility to select which inputs a certain output should use.
Default should be that it behaves as it does today.
Use case: [Why is this important (helps with prioritizing requests)]
Using the namepass/fieldpass/tagpass is not flexible enough especially when using the exec och httpjson inputs where the name can change or contain multiple names which might collide namewise with other inputs.
Also supporting dividing up the measurements in different databases so that 1) it's easier to scale influxdb instanses 2) get better performance and 3) easier for users to design dashboards
this would be a nice feature to have, but it's actually quite a tricky problem. Internally all plugins are placed in lists and there is no way to differentiate between two different
FWIW, the 3 current best workarounds are:
[[inputs.exec]] # ... name_prefix = "exec1_" [[inputs.exec]] # ... name_prefix = "exec2_" # this influxdb will only get exec1 [[outputs.influxdb]] # ... namepass = "exec1_*" # this will only get exec2 [[outputs.influxdb]] # ... namepass = "exec2_*"
I currently do this in my environment. My solution looks like:
This will send
I have tried that method using config files @joakimberglund but can't seem to get it to work. When I run a config test on it once I move my input and output files to /etc/telegraf/telegraf.d/ it fails with the following error
It looks like it isn't reading the files in the telegraf.d folder even after trying to add include "/etc/telegraf/telegraf.d/*.conf" to the end of the file. If I add that it fails with this error :
I'm wondering if there is some kind of test in telegraf that checks for an output section before allowing it to run. I'm going to try adding just one input and output plugin then add the others to the telegraf.d folder to see if that works.