Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    NRPE config problem on reboot

    pfSense Packages
    3
    5
    2.0k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • N
      ncolunga
      last edited by

      Hi,

      Each time pfsense is rebooted command configuration on NRPE it's lost. The information on the config.xml file is correct but /usr/local/etc/nrpe.cfg isn't created correctly (server_address, allowed_hosts etc are correct, only dissapear commands configuration). The problem can be workaround clicking save again on the nrpe configuration section of the web interface but sounds like there's some bug on the package.

      Best regards.

      This happens at least on pfsense 2.0-release with 2.12_3 v2 nrpe.

      1 Reply Last reply Reply Quote 0
      • S
        serialdie
        last edited by

        Same issue here.
        2.0 Release.
        i386

        1 Reply Last reply Reply Quote 0
        • N
          ncolunga
          last edited by

          The problem appears to be on a check of /usr/local/pkg/nrpe2.inc

          if (is_executable("{$nagios_check_path}/{$cmd['command']}"))

          Deleting that check makes /usr/local/etc/nrpe.cfg to be created properly on init. Unfortunately i have no idea of unwanted effects on this change  :-[

          EDIT: That doesn't work, the cfg file is ok but before restarting the service i still get errors on nagios untill a use the save button on web interface.

          This way the path is lost on commands:
          command[check_users]=/check_users instead of command[check_users]=/usr/local/libexec/nagios/check_users -w 5 -c 10

          Initializing $nagios_check_path = "/usr/local/libexec/nagios" before the if statement works properly.

          1 Reply Last reply Reply Quote 0
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            I tried beating on this in many ways but for some reason PHP refuses to honor the global statement for that variable, and only at boot time.

            It was only used in a few places so it's not a huge loss to have to declare it locally in the functions that need it, but it's annoying since using a single global there is much better style-wise.

            https://github.com/bsdperimeter/pfsense-packages/commit/f52026d30ffc5354a99999b5b036c67188b6018d

            Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

            1 Reply Last reply Reply Quote 0
            • S
              serialdie
              last edited by

              jimp,

              Thanks for the commit!

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.