diff --git a/net-mgmt/telegraf/Makefile b/net-mgmt/telegraf/Makefile index 166769c9b..2c0dd9078 100644 --- a/net-mgmt/telegraf/Makefile +++ b/net-mgmt/telegraf/Makefile @@ -1,5 +1,5 @@ PLUGIN_NAME= telegraf -PLUGIN_VERSION= 1.7.7 +PLUGIN_VERSION= 1.8.0 PLUGIN_COMMENT= Agent for collecting metrics and data PLUGIN_DEPENDS= telegraf PLUGIN_MAINTAINER= m.muenz@gmail.com diff --git a/net-mgmt/telegraf/pkg-descr b/net-mgmt/telegraf/pkg-descr index 3f381da7e..01c12dea5 100644 --- a/net-mgmt/telegraf/pkg-descr +++ b/net-mgmt/telegraf/pkg-descr @@ -11,6 +11,10 @@ Kafka, MQTT, NSQ, and many others. Plugin Changelog ================ +1.8.0 + +* Add InfluxDB v2 output support + 1.7.7 * Fix log not properly parsed diff --git a/net-mgmt/telegraf/src/opnsense/mvc/app/controllers/OPNsense/Telegraf/forms/output.xml b/net-mgmt/telegraf/src/opnsense/mvc/app/controllers/OPNsense/Telegraf/forms/output.xml index f338190c9..4594818ae 100644 --- a/net-mgmt/telegraf/src/opnsense/mvc/app/controllers/OPNsense/Telegraf/forms/output.xml +++ b/net-mgmt/telegraf/src/opnsense/mvc/app/controllers/OPNsense/Telegraf/forms/output.xml @@ -35,6 +35,36 @@ text Set the password for authentication. + + output.influx_v2_enable + + checkbox + This will enable InfluxDB v2 as output. Format is without square brackets, just like http://192.168.0.1:9999. + + + output.influx_v2_url + + text + Set the URL where metrics shoud be sent to. + + + output.influx_v2_token + + text + Influx v2 authentication token. + + + output.influx_v2_organization + + text + Set the name of the organization in Influx v2. + + + output.influx_v2_bucket + + text + Set the name of the bucket in Influx v2. + output.graphite_enable diff --git a/net-mgmt/telegraf/src/opnsense/mvc/app/models/OPNsense/Telegraf/Output.xml b/net-mgmt/telegraf/src/opnsense/mvc/app/models/OPNsense/Telegraf/Output.xml index f50f3755e..bd48099a4 100644 --- a/net-mgmt/telegraf/src/opnsense/mvc/app/models/OPNsense/Telegraf/Output.xml +++ b/net-mgmt/telegraf/src/opnsense/mvc/app/models/OPNsense/Telegraf/Output.xml @@ -1,7 +1,7 @@ //OPNsense/telegraf/output Telegraf outputs configuration - 1.3.1 + 1.4.0 0 @@ -85,5 +85,25 @@ 1 N + + 0 + N + + + + N + + + + N + + + + N + + + + N + diff --git a/net-mgmt/telegraf/src/opnsense/service/templates/OPNsense/Telegraf/telegraf.conf b/net-mgmt/telegraf/src/opnsense/service/templates/OPNsense/Telegraf/telegraf.conf index f8d01fab7..08f693803 100644 --- a/net-mgmt/telegraf/src/opnsense/service/templates/OPNsense/Telegraf/telegraf.conf +++ b/net-mgmt/telegraf/src/opnsense/service/templates/OPNsense/Telegraf/telegraf.conf @@ -129,6 +129,22 @@ {% endif %} {% endif %} +{% if helpers.exists('OPNsense.telegraf.output.influx_v2_enable') and OPNsense.telegraf.output.influx_v2_enable == '1' %} +[[outputs.influxdb_v2]] +{% if helpers.exists('OPNsense.telegraf.output.influx_v2_url') and OPNsense.telegraf.output.influx_v2_url != '' %} + urls = ["{{ OPNsense.telegraf.output.influx_v2_url }}"] +{% endif %} +{% if helpers.exists('OPNsense.telegraf.output.influx_v2_token') and OPNsense.telegraf.output.influx_v2_token != '' %} + token = "{{ OPNsense.telegraf.output.influx_v2_token }}" +{% endif %} +{% if helpers.exists('OPNsense.telegraf.output.influx_v2_organization') and OPNsense.telegraf.output.influx_v2_organization != '' %} + organization = "{{ OPNsense.telegraf.output.influx_v2_organization }}" +{% endif %} +{% if helpers.exists('OPNsense.telegraf.output.influx_v2_bucket') and OPNsense.telegraf.output.influx_v2_bucket != '' %} + bucket = "{{ OPNsense.telegraf.output.influx_v2_bucket }}" +{% endif %} +{% endif %} + {% if helpers.exists('OPNsense.telegraf.input.cpu') and OPNsense.telegraf.input.cpu == '1' %} [[inputs.cpu]] {% if helpers.exists('OPNsense.telegraf.input.cpu_percpu') and OPNsense.telegraf.input.cpu_percpu == '1' %}