Understanding filters and telegraf config division

Hello all, I have 2 basic doubts that I have not been able to answer googling.
Both are related to the same configuration: I have 5 inputs (opcua_listener), 3 processors (pivot and so on) and 2 outputs (mqtt and influxdb).

  1. I would like to send all the inputs to the outputs but the ones that will go to mqtt, I need to process them thanks to the 3 processors. I think the filters can help me…but I don’t know exactly how.
  2. As it is a very large configuration file, I would like to split the configuration file in different files, I have read https://www.influxdata.com/blog/telegraf-best-practices/ but for me it is not clear at all how could, at least isolate the different opcua_listener configurations which are the most extensive ones.

Thanks in advance,

By default all inputs’ collected data go to all processors and outputs. If you want to omit or select specific metrics or metrics with specific tags you can use metric selectors:

Telegraf reads all configuration files into one large config. From telegraf’s perspective it does not matter how many files or what inputs are in what files. The ability to use multiple files is purely a convivence to the user.

A plugin configuration cannot be split between multiple files. So if you have a [[inputs.opcua_listener]] all the config options for that plugin must be in the same file.