Nagios nrpe Version 3 after Upgrade to 2.3.5-RELEASE-p2?



  • Hi,

    yesterday I have upgraded my pfSense nodes from 2.3.5-RELEASE-p1 to the "new" 2.3.5-RELEASE-p2 version.
    After the upgrade the nagios nrpe is no longer running.
    If I try to start it from the WebGUI in "Status->Services " or activate it again in "Services->NPREv2" the service cannot be started-

    In the system.logs I found these messages:
    May 15 11:41:30 root /usr/local/etc/rc.d/nrpe2.sh: WARNING: run_rc_command: cannot run /usr/local/sbin/nrpe2
    May 15 11:41:30 php-fpm 65031 /pkg_edit.php: The command '/usr/local/etc/rc.d/nrpe2.sh stop' returned exit code '1', the output was 'nrpe2 not running? (check /var/run/nrpe2.pid).'

    After the upgrade the command "/usr/local/sbin/nrpe2" disappeared. Instead there is "/usr/local/sbin/nrpe3".
    If I try to start it on the commandline with nrpe3 it works with my existing config:
    /usr/local/sbin/nrpe3 -d -c /usr/local/etc/nrpe.cfg

    It seems that the pfsense expects nrpe2 and nrpe3 is installed.
    I tried to delete and reinstall the package… the same problem on both firewall nodes (CARP)

    Any ideas?



  • Hi,

    after digging a bit deeper I found a temporary workaround.
    The reason for the broken package is probably here: https://github.com/pfsense/FreeBSD-ports/commit/23105446eb30000f325a3220a23c4b46ac685fbb#diff-e54f521646e73d09b6538796c0626dcf
    Change dependency to nrpe3. Code fixes will come later

    After the installation the package reports:
    _**********************************************************************

    Enable NRPE in /etc/rc.conf with the following line:

    nrpe3_enable="YES"

    A sample configuration is available in /usr/local/etc/nrpe.cfg.sample.
    Copy to nrpe.cfg where required and edit to suit your needs.

    **********************************************************************_

    So the temporary workaround is to enable it in rc.conf and a link with ".sh" suffix to the nrpe3 then it is started automatically after a reboot :
    add nrpe3_enable="YES" to /etc/rc.conf

    .sh extensions in /etc/rc.d/ are executed at boot time: https://doc.pfsense.org/index.php/Executing_commands_at_boot_time

    cd /usr/local/etc/rc.d
    ln -s nrpe3 nrpe3.sh

    The full integration into the GUI is missing. The configuration can be edited with the GUI but after config changes, it has to be restarted manually on the command line. And the service is not marked as running in the services…



  • Hi,

    there was an upgrade for the nrpe Package from 2.3.2_2 TO 3.0 available.
    Now everything works as expected again…  :)


 

© Copyright 2002 - 2018 Rubicon Communications, LLC | Privacy Policy