This commit is contained in:
Thomas 2026-05-22 20:40:23 +02:00 committed by GitHub
commit 03dcba677e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 30 additions and 3 deletions

View file

@ -1,5 +1,5 @@
PLUGIN_NAME= telegraf
PLUGIN_VERSION= 1.12.14
PLUGIN_VERSION= 1.12.15
PLUGIN_COMMENT= Agent for collecting metrics and data
PLUGIN_DEPENDS= telegraf
PLUGIN_MAINTAINER= m.muenz@gmail.com

View file

@ -12,6 +12,11 @@ WWW: https://www.influxdata.com/time-series-platform/telegraf/
Plugin Changelog
================
1.12.15
* Add custom header support for OpenTelemetry output
* Quote OpenTelemetry service_address in config
1.12.14
* Add name_prefix in influxdb config

View file

@ -347,7 +347,7 @@
<id>output.opentelemetry_server</id>
<label>OpenTelemetry Server</label>
<type>text</type>
<help>Set the IP and port where metrics shoud be sent to, e.g. 192.168.0.1:4317.</help>
<help>For gRPC, set the address and port, e.g. 192.168.0.1:4317. For HTTP, use a full URL, e.g. https://collector.example.com/v1/metrics.</help>
</field>
<field>
<id>output.opentelemetry_compression</id>
@ -367,4 +367,16 @@
<type>checkbox</type>
<help>This will skip chain and host verification.</help>
</field>
<field>
<id>output.opentelemetry_header_name</id>
<label>Custom Header Name</label>
<type>text</type>
<help>Name of an additional HTTP header to send with requests, e.g. Authorization.</help>
</field>
<field>
<id>output.opentelemetry_header_value</id>
<label>Custom Header Value</label>
<type>text</type>
<help>Value for the custom header, e.g. Bearer your-token-here.</help>
</field>
</form>

View file

@ -204,5 +204,11 @@
<none>none</none>
</OptionValues>
</opentelemetry_compression>
<opentelemetry_header_name type="TextField">
<Required>N</Required>
</opentelemetry_header_name>
<opentelemetry_header_value type="TextField">
<Required>N</Required>
</opentelemetry_header_value>
</items>
</model>

View file

@ -143,7 +143,7 @@
{% if helpers.exists('OPNsense.telegraf.output.opentelemetry_enable') and OPNsense.telegraf.output.opentelemetry_enable == '1' %}
[[outputs.opentelemetry]]
{% if helpers.exists('OPNsense.telegraf.output.opentelemetry_server') and OPNsense.telegraf.output.opentelemetry_server != '' %}
service_address = {{ OPNsense.telegraf.output.opentelemetry_server }}
service_address = "{{ OPNsense.telegraf.output.opentelemetry_server }}"
{% endif %}
{% if helpers.exists('OPNsense.telegraf.output.opentelemetry_timeout') and OPNsense.telegraf.output.opentelemetry_timeout != '' %}
timeout = "{{ OPNsense.telegraf.output.opentelemetry_timeout }}s"
@ -156,6 +156,10 @@
{% if helpers.exists('OPNsense.telegraf.output.opentelemetry_compression') and OPNsense.telegraf.output.opentelemetry_compression != '' %}
compression = "{{ OPNsense.telegraf.output.opentelemetry_compression }}"
{% endif %}
{% if helpers.exists('OPNsense.telegraf.output.opentelemetry_header_name') and OPNsense.telegraf.output.opentelemetry_header_name != '' %}
[outputs.opentelemetry.headers]
"{{ OPNsense.telegraf.output.opentelemetry_header_name }}" = "{{ OPNsense.telegraf.output.opentelemetry_header_value }}"
{% endif %}
{% endif %}
{% if helpers.exists('OPNsense.telegraf.output.graphite_enable') and OPNsense.telegraf.output.graphite_enable == '1' %}