Ask Your Question

Where is /usr/lib/systemd/system/nagios.service

asked 2013-05-13 14:31:33 -0500

rlh100 gravatar image

I am feeling like a noob, but I went to install nagios on my FC18 desktop and when I run:

systemctl start nagios.service

It fails. If I look at the status for systemctl, I get:

systemctl status nagios.service

nagios.service - SYSV: Starts and stops the Nagios monitor

  Loaded: loaded (/etc/rc.d/init.d/nagios)

  Active: failed (Result: exit-code) since Mon 2013-05-13 12:23:22 PDT; 13s ago

 Process: 23543 ExecStart=/etc/rc.d/init.d/nagios start (code=exited, status=1/FAILURE)

If I fall back to:

service nagios start

I get:

Starting nagios (via systemctl): Job for nagios.service failed. See 'systemctl status nagios.service' and 'journalctl -xn' for details.

So I know this service should be managed by systemd.

If I list:

ls /usr/lib/systemd/system/*nagios*

I get:

ls: cannot access /usr/lib/systemd/system/*nagios*: No such file or directory

I have searched google and nothing comes up. I can't believe I am the first to encounter this problem. It is so basic. Feeling like a noob.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-05-14 05:05:30 -0500

lennart gravatar image

Native systemd unit files you find in /usr/lib/systemd/system/, legacy SysV init scripts you find in /etc/rc.d/init.d/. systemd will pick up both: the native units and the init scripts. The latter get automatically suffixed with ".service".

You nagios unit is one of those which are loaded from a SysV init script, and no native unit file exists for it. That's why you have /etc/rc.d/init.d/nagios but no /usr/lib/systemd/system/nagios.service.

"systemctl status nagios.service" will show you where the unit was loaded from and should show you the last log lines of it, which hopefully can tell you what is going on with nagios, and why it is failing.

edit flag offensive delete link more

Question Tools


Asked: 2013-05-13 14:31:33 -0500

Seen: 4,758 times

Last updated: May 14 '13