From e6c420e1060a5b10b45634ffe711ece11fb8efda Mon Sep 17 00:00:00 2001 From: Yonas Habteab Date: Tue, 24 Mar 2026 12:33:06 +0100 Subject: [PATCH] OTLP: Set `enable_ha` to true by default --- doc/09-object-types.md | 2 +- etc/icinga2/features-available/otlpmetrics.conf | 2 +- lib/perfdata/otlpmetricswriter.ti | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/09-object-types.md b/doc/09-object-types.md index 02d4cf9a2..3fe29702f 100644 --- a/doc/09-object-types.md +++ b/doc/09-object-types.md @@ -1902,7 +1902,7 @@ There are more configuration options available as described in the table below. | service\_resource\_attributes | Dictionary | **Optional.** Additional resource attributes to be included with service metrics. Defaults to none. | | flush\_interval | Duration | **Optional.** How long to buffer data points before transferring to the OTLP backend. Defaults to `15s`. | | flush\_threshold | Number | **Optional.** How many bytes to buffer before forcing a transfer to the OTLP backend. Defaults to `16MiB`. | -| enable\_ha | Boolean | **Optional.** Enable the high availability functionality. Has no effect in non-cluster setups. Defaults to `false`. | +| enable\_ha | Boolean | **Optional.** Enable the high availability functionality. Has no effect in non-cluster setups. Defaults to `true`. | | enable\_send\_thresholds | Boolean | **Optional.** Whether to stream warning, critical, minimum & maximum as separate metrics to the OTLP backend. Defaults to `false`. | | diconnect\_timeout | Duration | **Optional.** Timeout to wait for any outstanding data to be flushed to the OTLP backend before disconnecting. Defaults to `10s`. | | enable\_tls | Boolean | **Optional.** Whether to use a TLS stream. Defaults to `false`. | diff --git a/etc/icinga2/features-available/otlpmetrics.conf b/etc/icinga2/features-available/otlpmetrics.conf index bd5af67a2..6808c2015 100644 --- a/etc/icinga2/features-available/otlpmetrics.conf +++ b/etc/icinga2/features-available/otlpmetrics.conf @@ -32,7 +32,7 @@ object OTLPMetricsWriter "otlp-metrics" { # These are the default settings used by the OTel writer. Adjust them as needed. # Please refer to the documentation for more details on each option. - // enable_ha = false + // enable_ha = true // flush_interval = 15s // flush_threshold = 16*1024*1024 # When stopping Icinga 2, this timeout defines how long to wait for any pending OTel diff --git a/lib/perfdata/otlpmetricswriter.ti b/lib/perfdata/otlpmetricswriter.ti index 7e3ba9ea1..f9f3ca8e3 100644 --- a/lib/perfdata/otlpmetricswriter.ti +++ b/lib/perfdata/otlpmetricswriter.ti @@ -38,7 +38,7 @@ class OTLPMetricsWriter : ConfigObject default {{{ return 16 * 1024 * 1024; }}} }; [config] bool enable_ha { - default {{{ return false; }}} + default {{{ return true; }}} }; [config] bool enable_send_thresholds { default {{{ return false; }}}