Icinga2 and systemd

Hi, by ‘ps aux | grep icinga2’ I notice the process runs as user ‘nagios’.
I’m trying to understand where this is set on systemd.
I checked in these files:

find /etc/systemd /lib/systemd -name "*icinga*"
/etc/systemd/system/icinga2.service.d
/etc/systemd/system/multi-user.target.wants/icinga2.service
/lib/systemd/system/icinga2.service

but none of them mentions nagios user.
Insted I can find this information in

cat /etc/init.d/icinga2
DAEMON_USER=nagios
DAEMON_GROUP=nagios

Am I missing some systemd file?

Thank you.

Hi,

is this for informational purpose, or are you in the progress of changing this? If so, please don’t. The Debian packages use this user for historical purpose, and there’s no guarantee that Icinga works after changing this.

Cheers,
Michael

It’s just for informational purpose.
I have no plans to change the user, just wanted to better understand the systemd relation with icinga2 daemon.

Icinga comes pre-compiled with the run-as-user, the package build parameters set this accordingly to icinga/nagios. On startup, Icinga checks whether it has been started by root and impersonates Icinga with the set user/group (Systemd), or it already was spawned as the daemon user (that’s what happens in SysVInit).

It is possible to override this behaviour with sysconfig, still all the filesystem permissions and and later updates are problematic.

Cheers,
Michael