opnsense / plugins

OPNsense plugin collection
https://opnsense.org/
BSD 2-Clause "Simplified" License
844 stars 639 forks source link

os-telegraf: add name_prefix in influxdb config #4195

Open Matou25 opened 2 months ago

Matou25 commented 2 months ago

Important notices Before you add a new report, we ask you kindly to acknowledge the following:

Is your feature request related to a problem? Please describe.

i use telegraph to send data to grafana.net influxdb proxy for this purpose, name_prefix help to identify data in grafana. for now i edit config file /usr/local/etc/telegraf.conf and add : nameprefix = "OpnSense" in [[outputs.influxdb]] section

but every day at midnight this config file is replaced by the datas from opnsense gui which not contain name_prefix.

Describe the solution you'd like

is it possible to addname_prefix field in telegraf output influxdb config ?

Describe alternatives you've considered editing config file /usr/local/etc/telegraf.conf

Additional context OpnSense version : 24.1.10_3 os-telegraf version : 1.12.11 Plugin GUI URL: https://opnsense/ui/telegraf/output/index

Matou25 commented 2 months ago

i create a PR for this https://github.com/opnsense/plugins/pull/4198