NRPE config problem on reboot
-
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.
-
Same issue here.
2.0 Release.
i386 -
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 10Initializing $nagios_check_path = "/usr/local/libexec/nagios" before the if statement works properly.
-
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
-
jimp,
Thanks for the commit!