[Pkg-nagios-devel] Bug#1149586: icinga2-common: icinga's logrotate emits "Error while parsing command-line options: the argument for option '--pid' is invalid"
Tomas Pospisek
tpo_deb at sourcepole.ch
Thu Oct 1 09:04:52 BST 2026
Package: icinga2-common
Version: 2.14.6-1+deb13u1
Severity: minor
Tags: patch
Dear maintainer,
I am getting from cron:
/etc/cron.daily/logrotate:
[2026-10-01 06:00:29 +0200] critical/icinga-app: Error while parsing command-line options: the argument for option '--pid' is invalid
I propose to:
# diff -u icinga2 icinga2.patched
--- icinga2 2026-07-07 06:21:07.000000000 +0200
+++ icinga2.patched 2026-10-01 09:49:57.936790425 +0200
@@ -7,7 +7,7 @@
notifempty
create 644 nagios nagios
postrotate
- /usr/sbin/icinga2 internal signal --sig SIGUSR1 --pid "$(cat /run/icinga2/icinga2.pid 2> /dev/null)" 2> /dev/null || true
+ /usr/sbin/icinga2 internal signal --sig SIGUSR1 --pid "$(cat /run/icinga2/icinga2.pid 2> /dev/null)" &> /dev/null || true
endscript
}
However a better fix would probably be to have the icinga2 binary emit its option parsing errors on STDERR instead of emitting them on STDOUT...
This same problem is probably present upstream.
Thanks a log for maintaining icinga <3!
*t
-- System Information:
Debian Release: 13.7
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'oldstable-security'), (500, 'stable'), (500, 'oldstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 6.12.107+deb13-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE
Locale: LANG=de_CH.UTF-8, LC_CTYPE=de_CH.UTF-8 (charmap=UTF-8), LANGUAGE=de_CH:de
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages icinga2-common depends on:
ii adduser 3.152
ii lsb-release 12.1-1
ii sysvinit-utils 3.14-4
Versions of packages icinga2-common recommends:
ii logrotate 3.22.0-1
icinga2-common suggests no packages.
More information about the Pkg-nagios-devel
mailing list