mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
Added Telegraf InfluxDB v2 Output Support (#1849)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -35,6 +35,36 @@
|
||||
<type>text</type>
|
||||
<help>Set the password for authentication.</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>output.influx_v2_enable</id>
|
||||
<label>Enable Influx v2 Output</label>
|
||||
<type>checkbox</type>
|
||||
<help>This will enable InfluxDB v2 as output. Format is without square brackets, just like http://192.168.0.1:9999.</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>output.influx_v2_url</id>
|
||||
<label>Influx v2 URL</label>
|
||||
<type>text</type>
|
||||
<help>Set the URL where metrics shoud be sent to.</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>output.influx_v2_token</id>
|
||||
<label>Influx v2 Token</label>
|
||||
<type>text</type>
|
||||
<help>Influx v2 authentication token.</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>output.influx_v2_organization</id>
|
||||
<label>Influx v2 Organization</label>
|
||||
<type>text</type>
|
||||
<help>Set the name of the organization in Influx v2.</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>output.influx_v2_bucket</id>
|
||||
<label>Influx v2 Bucket</label>
|
||||
<type>text</type>
|
||||
<help>Set the name of the bucket in Influx v2.</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>output.graphite_enable</id>
|
||||
<label>Enable Graphite Output</label>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<model>
|
||||
<mount>//OPNsense/telegraf/output</mount>
|
||||
<description>Telegraf outputs configuration</description>
|
||||
<version>1.3.1</version>
|
||||
<version>1.4.0</version>
|
||||
<items>
|
||||
<influx_enable type="BooleanField">
|
||||
<default>0</default>
|
||||
@@ -85,5 +85,25 @@
|
||||
<default>1</default>
|
||||
<Required>N</Required>
|
||||
</prometheus_stringaslabel>
|
||||
<influx_v2_enable type="BooleanField">
|
||||
<default>0</default>
|
||||
<Required>N</Required>
|
||||
</influx_v2_enable>
|
||||
<influx_v2_url type="TextField">
|
||||
<default></default>
|
||||
<Required>N</Required>
|
||||
</influx_v2_url>
|
||||
<influx_v2_token type="TextField">
|
||||
<default></default>
|
||||
<Required>N</Required>
|
||||
</influx_v2_token>
|
||||
<influx_v2_organization type="TextField">
|
||||
<default></default>
|
||||
<Required>N</Required>
|
||||
</influx_v2_organization>
|
||||
<influx_v2_bucket type="TextField">
|
||||
<default></default>
|
||||
<Required>N</Required>
|
||||
</influx_v2_bucket>
|
||||
</items>
|
||||
</model>
|
||||
|
||||
@@ -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' %}
|
||||
|
||||
Reference in New Issue
Block a user