Telegraf does not facilitate InfluxDB2 (when using pfSense GUI)
-
pfSense 23.05-RELEASE (amd64)
telegraf-1.26.1 (according to pfSense GUI package manager)
FYI the CLI displays[root@pfSense.localdomain]/:telegraf --version telegraf --version Telegraf unknown
Using the pfSense Telegraf GUI creates a telegraf.conf file with a influxDB(version1) output config every time. There is no way to not include that which I believe is crashing Telegraf before it can load the output for InfluxDB2
[[outputs.influxdb]] urls = [""] database = "" ssl_ca = "/usr/local/etc/telegraf.ca"
My config includes the influxdbv2 output added using the pfSense GUI "Additional configuration for Telegraf" field.
it generates the below[[outputs.influxdb_v2]]^M urls = ["http://10.10.10.2:8086"]^M token = "$$$TOKEN$$$"^M organization = "myorganisation"^M bucket = "mybucket"^M
When I run telegraf from the CLI i get the following error
2023-05-25T09:13:27Z E! [agent] Failed to connect to [outputs.influxdb], retrying in 15s, error was "unsupported scheme [""]: """
[23.05-RELEASE][root@pfSense.localdomain]/usr/local/etc: telegraf --config telegraf.conf --once 2023-05-25T09:13:27Z I! Loading config file: telegraf.conf 2023-05-25T09:13:27Z I! Starting Telegraf unknown 2023-05-25T09:13:27Z I! Available plugins: 235 inputs, 9 aggregators, 27 processors, 22 parsers, 57 outputs, 1 secret-stores 2023-05-25T09:13:27Z I! Loaded inputs: cpu disk diskio kernel mem net pf processes swap system 2023-05-25T09:13:27Z I! Loaded aggregators: 2023-05-25T09:13:27Z I! Loaded processors: 2023-05-25T09:13:27Z I! Loaded secretstores: 2023-05-25T09:13:27Z I! Loaded outputs: influxdb influxdb_v2 2023-05-25T09:13:27Z I! Tags enabled: host=pfSense.localdomain 2023-05-25T09:13:27Z D! [agent] Initializing plugins 2023-05-25T09:13:27Z W! [inputs.kernel] current platform is not supported 2023-05-25T09:13:27Z D! [agent] Connecting outputs 2023-05-25T09:13:27Z D! [agent] Attempting connection to [outputs.influxdb] **2023-05-25T09:13:27Z E! [agent] Failed to connect to [outputs.influxdb], retrying in 15s, error was "unsupported scheme [\"\"]: \"\""** 2023-05-25T09:13:42Z E! [telegraf] Error running agent: connecting output outputs.influxdb: error connecting to output "outputs.influxdb": unsupported scheme [""]: ""
It looks like including the influxdb(version1) output in the config file is crashing Telegraf.
PROPOSED SOLUTION:
Enable a InfluxDB2 config generator from the pfSense GUI ?