I have multiple input telegraf input plugins for every application and they are separated by the app.toml files. output plugin for all of them is configured in the global telegraf.conf file to write to InfluxDB
Now I am trying to introduce new app but write it's metrics to local filesystem and everything else continue to write to influxDB.
Now when I have my new app with the below configuration, the output file /tmp/metrics.out is collecting all the metrics from other apps as well.
[[inputs.app]]
context = "/jolokia/read"
servers = [":7090"]
metrics = ["/jvm_heap_usage"]
[[outputs.file]]
## Files to write to, "stdout" is a specially handled file.
files = ["/tmp/metrics.out"]
How can I send all the metrics to InfluxDB and only one app where I added outputs.file to send to local filesystem?
This can be achieved by using the
namepass
option on the output plugin.The name of the input plugin can also be modified using
name_override
,name_prefix
, orname_suffix
.