nagios-nrpe-server.service won't start when disable_syslog is set in config #1

Closed
opened 2021-08-06 11:14:51 +02:00 by sf · 4 comments
Owner

go-nrpe does not unterstand config option disable_syslog.

root@hydra:~# systemctl status nagios-nrpe-server.service 
● nagios-nrpe-server.service - Nagios Remote Plugin Executor
     Loaded: loaded (/lib/systemd/system/nagios-nrpe-server.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Fri 2021-08-06 10:57:42 CEST; 15s ago
       Docs: http://www.nagios.org/documentation
    Process: 1630445 ExecStart=/usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -f $NRPE_OPTS (code=exited, status=1/FAILURE)
    Process: 1630456 ExecStopPost=/bin/rm -f /run/nagios/nrpe.pid (code=exited, status=0/SUCCESS)
   Main PID: 1630445 (code=exited, status=1/FAILURE)
        CPU: 42ms

Aug 06 10:57:42 hydra systemd[1]: Started Nagios Remote Plugin Executor.
Aug 06 10:57:42 hydra nrpe[1630445]: nrpe: Read Config: /etc/nagios/nrpe.cfg:275: invalid item: "config".disable_syslog
Aug 06 10:57:42 hydra systemd[1]: nagios-nrpe-server.service: Main process exited, code=exited, status=1/FAILURE
Aug 06 10:57:42 hydra systemd[1]: nagios-nrpe-server.service: Failed with result 'exit-code'.
go-nrpe does not unterstand config option `disable_syslog`. ``` root@hydra:~# systemctl status nagios-nrpe-server.service ● nagios-nrpe-server.service - Nagios Remote Plugin Executor Loaded: loaded (/lib/systemd/system/nagios-nrpe-server.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Fri 2021-08-06 10:57:42 CEST; 15s ago Docs: http://www.nagios.org/documentation Process: 1630445 ExecStart=/usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -f $NRPE_OPTS (code=exited, status=1/FAILURE) Process: 1630456 ExecStopPost=/bin/rm -f /run/nagios/nrpe.pid (code=exited, status=0/SUCCESS) Main PID: 1630445 (code=exited, status=1/FAILURE) CPU: 42ms Aug 06 10:57:42 hydra systemd[1]: Started Nagios Remote Plugin Executor. Aug 06 10:57:42 hydra nrpe[1630445]: nrpe: Read Config: /etc/nagios/nrpe.cfg:275: invalid item: "config".disable_syslog Aug 06 10:57:42 hydra systemd[1]: nagios-nrpe-server.service: Main process exited, code=exited, status=1/FAILURE Aug 06 10:57:42 hydra systemd[1]: nagios-nrpe-server.service: Failed with result 'exit-code'. ```
heiko self-assigned this 2021-08-06 11:15:08 +02:00
sf changed title from nagios-nrpe-server.service won't start to nagios-nrpe-server.service won't start when disable_syslog is set in config 2021-08-06 11:15:35 +02:00
Owner

Maybe I'll implement a warning for all unrecognised config options, as it seems that the upstream NRPE server invents lots of new options.

Alternativly we may want to use an other configuration file, something like /etc/nagios/go-nrpe.conf, which contains a copy of the valid options from the /etc/nagios.nrpe.conf. But then, even the /etc/nagios/nrpe.d/*conf may contain invalid/unknown options.

So, I'll go for the first option, just complain at startup and then continue running.

Maybe I'll implement a warning for all unrecognised config options, as it seems that the upstream NRPE server invents lots of new options. Alternativly we may want to use an other configuration file, something like `/etc/nagios/go-nrpe.conf`, which contains a copy of the valid options from the `/etc/nagios.nrpe.conf`. But then, even the `/etc/nagios/nrpe.d/*conf` may contain invalid/unknown options. So, I'll go for the first option, just complain at startup and then continue running.
heiko closed this issue 2021-08-07 00:30:30 +02:00
heiko stopped working 2021-08-07 00:30:31 +02:00
9h 16min 46s
Owner

@sf, Please test and provide feedback. If it keeps crashing, use Go 1.16 to build the binary.

@sf, Please test and provide feedback. If it keeps crashing, use Go 1.16 to build the binary.
Author
Owner

@heiko Works as expected.
Build with go 1.15.9.

@heiko Works as expected. Build with go 1.15.9.
Owner

Thx. Released v2.1.0 on the release branch

Thx. Released v2.1.0 on the release branch
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Total time spent: 9 hours 16 minutes
heiko
9 hours 16 minutes
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
IUS/go-nrpe#1
No description provided.