From cb2de1f97ab0961f0837ca88786ac371a5def07f Mon Sep 17 00:00:00 2001 From: Kieran Pilkington Date: Mon, 25 Nov 2024 11:25:15 +1300 Subject: [PATCH] Update otelcol-contrib.service Add ExecReload command to reload configs without restarting the opentelemetry process (to prevent data loss) --- distributions/otelcol-contrib/otelcol-contrib.service | 1 + distributions/otelcol-otlp/otelcol-otlp.service | 1 + distributions/otelcol/otelcol.service | 1 + 3 files changed, 3 insertions(+) diff --git a/distributions/otelcol-contrib/otelcol-contrib.service b/distributions/otelcol-contrib/otelcol-contrib.service index 453a5713..974058d7 100644 --- a/distributions/otelcol-contrib/otelcol-contrib.service +++ b/distributions/otelcol-contrib/otelcol-contrib.service @@ -5,6 +5,7 @@ After=network.target [Service] EnvironmentFile=/etc/otelcol-contrib/otelcol-contrib.conf ExecStart=/usr/bin/otelcol-contrib $OTELCOL_OPTIONS +ExecReload=/bin/kill -HUP $MAINPID KillMode=mixed Restart=on-failure Type=simple diff --git a/distributions/otelcol-otlp/otelcol-otlp.service b/distributions/otelcol-otlp/otelcol-otlp.service index bb7ea348..2f3c6beb 100644 --- a/distributions/otelcol-otlp/otelcol-otlp.service +++ b/distributions/otelcol-otlp/otelcol-otlp.service @@ -5,6 +5,7 @@ After=network.target [Service] EnvironmentFile=/etc/otelcol-otlp/otelcol-otlp.conf ExecStart=/usr/bin/otelcol-otlp $OTELCOL_OPTIONS +ExecReload=/bin/kill -HUP $MAINPID KillMode=mixed Restart=on-failure Type=simple diff --git a/distributions/otelcol/otelcol.service b/distributions/otelcol/otelcol.service index f3c4e62e..8e96c36b 100644 --- a/distributions/otelcol/otelcol.service +++ b/distributions/otelcol/otelcol.service @@ -5,6 +5,7 @@ After=network.target [Service] EnvironmentFile=/etc/otelcol/otelcol.conf ExecStart=/usr/bin/otelcol $OTELCOL_OPTIONS +ExecReload=/bin/kill -HUP $MAINPID KillMode=mixed Restart=on-failure Type=simple