Univention Bugzilla – Bug 34063
nagios-nrpe-server doesn't create a pid file
Last modified: 2014-04-30 08:49:34 CEST
UCS 3.2 Errata 45 nagios-nrpe-server version 2.12-4.12.201104270034 Due to missing permissions, the nagios user cannot create it's pid file in /var/run. # cat /var/log/syslog | grep nrpe.pid Jan 24 13:14:10 master nrpe[23500]: Cannot write to pidfile '/var/run/nrpe.pid' - check your privileges. According to the change log of nagios-nrpe-server the handling of pid files in version 2.12-4 was changed: * Fix pidfile handling (Closes: #411046) http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=411046 See the configuration file /etc/nagios/nrpe.cfg.debian for details: # 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=/var/run/nagios/nrpe.pid This was not included in the current Univention-Template as expexted: /etc/univention/templates/files/etc/nagios/nrpe.cfg # 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=/var/run/nrpe.pid This is important, since the nagios-nrpe-server (version 2.12-5) start-stop-daemon uses the pid file. * [e776f7b] Use pidfile for start-stop-daemon and fix pidfile deletion (Closes: #548157, #639523) http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=639523 I feel /etc/univention/templates/files/etc/nagios/nrpe.cfg needs to be changed accordingly.
In univention-nagios-client: * Changed pid_file to /var/run/nagios/nrpe.pid in /etc/univention/templates/files/etc/nagios/nrpe.cfg * Create and "chown nagios" PIDDIR=/var/run/nagios in /etc/univention/templates/files/etc/init.d/nagios-nrpe-server: YAML: 2014-03-17-univention-nagios.yaml
OK: r48584,r48571 OK: grep nrpe.pid /var/log/syslog OK: aptitude install '?source-package(univention-nagios)?installed' OK: ps $(</var/run/nagios/nrpe.pid) OK: ~/bin/announce_errata -V 2014-03-17-univention-nagios.yaml FIXED: r48586,r49020 2014-03-17-univention-nagios.yaml
http://errata.univention.de/ucs/3.2/101.html