Page 1 of 1

Nagios Service wont start after install

Posted: Wed Jul 13, 2022 8:38 am
by jluna1982
Seeing the following. Can anyone help me with this?

nagios.service: Failed with result 'exit-code'.



× nagios.service - Nagios Core 4.4.7
Loaded: loaded (/lib/systemd/system/nagios.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2022-07-13 13:36:46 UTC; 40ms ago
Docs: https://www.nagios.org/documentation
Process: 15782 ExecStartPre=/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg (code=exited, status=0/SUCCESS)
Process: 15783 ExecStart=/usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg (code=exited, status=0/SUCCESS)
Process: 15789 ExecStopPost=/usr/bin/rm -f /usr/local/nagios/var/rw/nagios.cmd (code=exited, status=0/SUCCESS)
Main PID: 15784 (code=exited, status=254)
CPU: 87ms

Re: Nagios Service wont start after install

Posted: Thu Jul 14, 2022 10:48 am
by gormank
Try running the following from the shell. See what the output is.

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
/usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg

Re: Nagios Service wont start after install

Posted: Tue Jul 19, 2022 5:00 am
by SohamMaoor
Whenever any changes have been made in the config file, it is good to verify it. Nagios provides a verify command for this purpose.

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
After running the above command, the output must end with the below contents to confirm that there is no further issue.

Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors: 0

Things look okay - No serious problems were detected echatspin echatrandom during the pre-flight check