Hi All,
Trying to setup nagios to monitor my network, I have everything installed from YaST, and have edited the config files as needed.
I have enabled the service with systemctl enable nagios
However when I attempt to start nagios with systemctl start nagios and then check it’s status with systemctl status it seems to shutdown immediately
type ○ nagios.service - Network Monitor Nagios
Loaded: loaded (/usr/lib/systemd/system/nagios.service; enabled; preset: d>
Active: inactive (dead) since Mon 2024-08-05 19:08:57 BST; 2s ago
Duration: 26ms
Invocation: f9e2def99a5d4b42b2f7dbf5522e5b78
Process: 24288 ExecStartPre=/usr/sbin/nagios -v /etc/nagios/nagios.cfg (cod>
Process: 24290 ExecStart=/usr/sbin/nagios -d /etc/nagios/nagios.cfg (code=e>
Process: 24322 ExecStopPost=/usr/bin/rm -f /var/spool/nagios/nagios.cmd (co>
Main PID: 24290 (code=exited, status=0/SUCCESS)
CPU: 129ms
Aug 05 19:08:57 capella nagios[24294]: wproc: Registry request: name=Core Worke>
Aug 05 19:08:57 capella nagios[24294]: wproc: Registry request: name=Core Worke>
Aug 05 19:08:57 capella nagios[24294]: wproc: Registry request: name=Core Worke>
Aug 05 19:08:57 capella nagios[24294]: wproc: Registry request: name=Core Worke>
Aug 05 19:08:57 capella nagios[24294]: wproc: Registry request: name=Core Worke>
Aug 05 19:08:57 capella nagios[24294]: wproc: Registry request: name=Core Worke>
Aug 05 19:08:57 capella nagios[24294]: wproc: Registry request: name=Core Worke>
Aug 05 19:08:57 capella nagios[24294]: Successfully launched command file worke>
Aug 05 19:08:57 capella nagios[24294]: Successfully shutdown... (PID=24294)
Aug 05 19:08:57 capella systemd[1]: nagios.service: Deactivated successfully.or paste code here
This leads to the web interface not working correctly.
running the ExecPre command (/usr/sbin/nagios -v /etc/nagios/nagios.cfg) reports no warnings or errors.
Manually running the ExecStart (/usr/sbin/nagios -d /etc/nagios/nagios.cfg) results in several nagios processes being launched and the web interface works.
So it seems there is a problem with the systemd file.
Does anyone have any idea how I may fix this?
Note: other than enabling it, I’ve not touched the systemd unit file.
Cheers.
Phill.