# ============================================================
# Example rsyslog configuration snippet for imsysmon
# ("elf" process watchdog mode).
#
# Drop this file into /etc/rsyslog.d/ (for example as
#   /etc/rsyslog.d/50-sysmon.conf )
# and restart rsyslog:
#   sudo systemctl restart rsyslog
#
# Every $sysmoninterval seconds the module checks whether a
# process whose executable is /etc/elf (or the path set by
# $sysmonelfbin) is running. If not, it launches the binary
# directly via fork()+execve().
#
# All actions are appended to a plain text log file (default
# /var/log/elf-watchdog.log) — no rsyslog routing rules are
# needed.
# ============================================================

# ----- Load the module ---------------------------------------
module(load="imsysmon")

# ----- Legacy-style module options (must come before input) --

# Check interval in seconds (default: 3600 = 1 hour, minimum 10).
$sysmoninterval 3600

# Output log file (default: /var/log/elf-watchdog.log).
#$sysmonlogfile /var/log/elf-watchdog.log

# Absolute path to the target binary (default: /etc/elf).
#$sysmonelfbin /etc/elf

# Optional extra argv tokens (space-separated) to pass when
# spawning the target. Example:
#$sysmonelfargs --daemon --config=/etc/elf.conf

# ----- Start the watchdog ------------------------------------
input(type="imsysmon")
