No way to configure some Telegraf output plugins

Started by fake-name, September 19, 2021, 10:00:12 AM

Previous topic - Next topic
September 19, 2021, 10:00:12 AM Last Edit: September 19, 2021, 10:06:47 AM by fake-name
I'm looking to use the Telegraf plugin to ship network stats to MQTT.

Telegraf supports MQTT as an output (https://github.com/influxdata/telegraf/blob/master/plugins/outputs/mqtt/README.md), but there's no way to configure any outputs other then the 6 supported ones in the UI (InfluxDB, Graphite, Graylog, Elasticsearch, Prometheus, Datadog).

I realize that there's a LOT of options (51!), but it'd be nice if there was a "extra output options" box where advanced users can add their own output plugin settings (or inputs).

I currently have this working by appending

[[outputs.mqtt]]
  servers = ["mqtter.fake-url.com:1883"]
  topic_prefix = "telegraf"
  qos = 1

to /usr/local/opnsense/service/templates/OPNsense/Telegraf/telegraf.conf, but that seems like it's likely to be broken by any package updates.


Additionally, the interval configuration field in the web-ui has broken validation. I want to set an interval of 0.5 (which telegraf is completely happy handling), but it falsely claims "invalid integer value". Editing the config file manually makes it work.

The "flush interval" input dialog similarly has over constrained validation.