Bug ID | 986553 |
---|---|
Summary | server:monitoring/nrpe: Bug |
Classification | openSUSE |
Product | openSUSE.org |
Version | unspecified |
Hardware | Other |
OS | Other |
Status | NEW |
Severity | Normal |
Priority | P5 - None |
Component | 3rd party software |
Assignee | nix@opensuse.org |
Reporter | dcook@prosentient.com.au |
QA Contact | opensuse-communityscreening@forge.provo.novell.com |
Found By | --- |
Blocker | --- |
I've installed "nrpe" on SLES12SP1, but I'm having an issue when I start up the nrpe daemon: Jun 27 12:30:11 linux-9oij nrpe[9175]: Cannot write to pidfile '/run/nrpe/nrpe.pid' - check your privileges. I checked and "/run/nrpe" doesn't exist. It doesn't look like the RPM created it. I'm not sure where the source nrpe.spec is but I looked at https://build.opensuse.org/package/view_file/server:monitoring/nrpe/nrpe.spec?expand=1 and found this: %if 0%{?suse_version} <= 1230 %{_sysconfdir}/init.d/nrpe %ghost %dir %{_rundir}/%{name} %ghost %{_rundir}/%{name}/nrpe.pid %endif I wasn't familiar with the %ghost directive so I read http://www.rpm.org/max-rpm-snapshot/s1-rpm-inside-files-list-directives.html I don't see /run/nrpe or /run/nrpe/nrpe.pid in the RPM listing... linux-9oij:/srv/www # rpm -ql nrpe /etc/nrpe.cfg /etc/nrpe.d /etc/sysconfig/SuSEfirewall2.d/services/nrpe /etc/xinetd.d/nrpe /usr/lib/systemd/system/nrpe.service /usr/lib/systemd/system/nrpe.socket /usr/lib/systemd/system/nrpe@.service /usr/lib/tmpfiles.d/nrpe.conf /usr/sbin/nrpe /usr/sbin/rcnrpe /usr/share/doc/packages/nrpe /usr/share/doc/packages/nrpe/README.SSL /usr/share/doc/packages/nrpe/README.SUSE /usr/share/doc/packages/nrpe/SECURITY /usr/share/man/man8/nrpe.8.gz And after I manually create /run/nrpe and restart the NRPE daemon, "/run/nrpe" and "/run/nrpe/nrpe.pid" don't appear to be owned by nrpe: linux-9oij:/srv/www # rpm -qf /run/nrpe/nrpe.pid file /run/nrpe/nrpe.pid is not owned by any package linux-9oij:/srv/www # rpm -qf /run/nrpe/ file /run/nrpe is not owned by any package So I'm guessing my suse_version might be acting up, so I looked at the output of "rpm --showrc | grep "suse"": -14: suse_version 1315 According to https://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto, 1315 is SLES 12 or openSUSE Leap 42.x So that seems a bit nuts... I have sysemd, so I don't need the /etc/inti.d/nrpe service, but the systemd unit complains when it can't write to /run/nrpe/nrpe.pid. Of course, I'm not 100% sure why it needs the pid... I see no references in the systemd units. If I look in /etc/nrpe.cfg, I see the following: # PID FILE # The name of the file in which the NRPE daemon should write it's process ID # number. The file is only written if the NRPE daemon is started by the root # user and is running in standalone mode. pid_file=/run/nrpe/nrpe.pid Here's what I see via ps: nagios 9252 1 0 12:34 ? 00:00:00 /usr/sbin/nrpe -c /etc/nrpe.cfg -d According to http://docs.icinga.org/latest/en/nrpe.html, the other option than "standalone mode" is to start it with xinetd, which seems to be disabled by default with systemd... I imagine most people would use systemd over xinetd...so I'm not sure why the pid is being ghosted in the nrpe package.