OPNsense Forum

English Forums => General Discussion => Topic started by: RP_pro on February 22, 2024, 09:53:29 am

Title: setting up nrpe on opnsense 24.1.1| config set back after reboot
Post by: RP_pro on February 22, 2024, 09:53:29 am
hi
i installed the plugin and configured the nrpe service.
on this i have two major problems.
i edited the file /etc/rc.conf with the following line
--------------
nrpe_enable="YES"
--------------

but when i execute service nrpe start i got the following error
----------------------
Cannot 'start' nrpe. Set nrpe_enable to YES in /etc/rc.conf or use 'onestart' instead of 'start'.
----------------------

the second issue with the configuration itself. i modify the file
/usr/local/etc/nrpe.cfg

but after any reboot this file is set back to empty. (like it was in the beginning) 
i would think that the installation is not permanent but all the changes done to /etc/rc.conf are persisted.
only the config /usr/local/etc/nrpe.cfg is set back
also all other configuration trough the web interface are stored and correctly reloaded after the reboot.

thank you for any advice how to solve these issue





Title: Re: setting up nrpe on opnsense 24.1.1| config set back after reboot
Post by: RP_pro on February 23, 2024, 11:24:21 am
i could find the solution for the first part
to start the service automatically we have to change the file
/etc/rc.conf.d/nrpe
with
nrpe_enable="YES"

not the file /etc/rc.conf

the second problem, (the reset of the configuration file is still an open issue)
even the file /etc/rc.conf.d/nrpe is set back after reboot :(


but the funny part i modified the file /usr/local/etc/nrpe.cfg.sample
with my right configuration, this file is persistent!
Title: Re: setting up nrpe on opnsense 24.1.1| config set back after reboot
Post by: Patrick M. Hausen on February 23, 2024, 11:28:21 am
Why are you not navigating to Services > NRPE and using the UI to enable and configure the service as intended?
Title: Re: setting up nrpe on opnsense 24.1.1| config set back after reboot
Post by: RP_pro on February 23, 2024, 11:33:52 am
this was the solution of my mystery
thank you, this solved all my problems
:)