Skip to main content

Sdnotify Extension

Status Available in: contrib Maintainers: @VihasMakwana, @iypetrov Source: opentelemetry-collector-contrib

Overview

The sd_notify extension integrates the collector with the sd_notify(3) protocol. When running under a Type=notify (or Type=notify-reload) systemd unit, the collector will:
  • Send READY=1 once all pipelines have started.
  • Send STOPPING=1 when the process is shutting down after receiving SIGINT or SIGTERM, so systemd knows the shutdown is intentional.
  • (only for Type=notify-reload) On SIGHUP send RELOADING=1 (paired with MONOTONIC_USEC as required by sd_notify(3)) so systemd’s state machine correctly reflects that a reload is in progress. The extension doesn’t itself drive a reload or cycle the process on SIGHUP. The OpenTelemetry Collector has its own SIGHUP handler that performs an in-process reload.
  • When systemd has set WATCHDOG_USEC for the collector’s PID, send WATCHDOG=1 keep-alive notifications every WATCHDOG_USEC / 2 as recommended by sd_watchdog_enabled(3), for as long as the collector is running, so systemd can restart the process if it hangs.
It is recommended that a daemon sends a keep-alive notification message to the service manager every half of the time returned here.
NOTE: When $NOTIFY_SOCKET is not set the extension logs a warning and stays a no-op — it will never fail collector startup.

Configuration

The extension takes no configuration:

Example systemd unit


Last generated: 2026-08-17