Nagios Core on Raspberry Pi fails to start
Posted: Mon Mar 31, 2025 2:12 pm
I've gone through the manual installation process, whereby I built the users and user groups and compiled the code. Everything was working just fine last night. I then started editing the nagios.cfg file to add additional hosts and host groups. The start failed When I tried reloading Nagios with the additional hosts.
What I see when I run journalctl -xeu nagios.service is
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Mar 31 13:57:02 raspberrypi42nd nagios[5965]: Nagios Core 4.5.9
Mar 31 13:57:02 raspberrypi42nd nagios[5965]: Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Mar 31 13:57:02 raspberrypi42nd nagios[5965]: Copyright (c) 1999-2009 Ethan Galstad
Mar 31 13:57:02 raspberrypi42nd nagios[5965]: Last Modified: 2024-12-19
Mar 31 13:57:02 raspberrypi42nd nagios[5965]: License: GPL
Mar 31 13:57:02 raspberrypi42nd nagios[5965]: Website: https://www.nagios.org
Mar 31 13:57:02 raspberrypi42nd nagios[5965]: Reading configuration data...
Mar 31 13:57:02 raspberrypi42nd nagios[5965]: Read main config file okay...
Mar 31 13:57:02 raspberrypi42nd nagios[5965]: Error: Template 'RaspberryPi' specified in host definition could not be not found (config file '>
Mar 31 13:57:02 raspberrypi42nd nagios[5965]: Error: Invalid max_check_attempts value for host 'RaspberryPi42nd'
Mar 31 13:57:02 raspberrypi42nd nagios[5965]: Error: Could not register host (config file '/usr/local/nagios/etc/objects/RPi42.cfg', starting >
Mar 31 13:57:02 raspberrypi42nd nagios[5965]: Error processing object config files!
Mar 31 13:57:02 raspberrypi42nd nagios[5965]: ***> One or more problems was encountered while processing the config files...
Mar 31 13:57:02 raspberrypi42nd nagios[5965]: Check your configuration file(s) to ensure that they contain valid
Mar 31 13:57:02 raspberrypi42nd nagios[5965]: directives and data definitions. If you are upgrading from a previous
Mar 31 13:57:02 raspberrypi42nd nagios[5965]: version of Nagios, you should be aware that some variables/definitions
Mar 31 13:57:02 raspberrypi42nd nagios[5965]: may have been removed or modified in this version. Make sure to read
Mar 31 13:57:02 raspberrypi42nd nagios[5965]: the HTML documentation regarding the config files, as well as the
Mar 31 13:57:02 raspberrypi42nd nagios[5965]: 'Whats New' section to find out what has changed.
Mar 31 13:57:02 raspberrypi42nd systemd[1]: nagios.service: Control process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ An ExecStartPre= process belonging to unit nagios.service has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 1.
Mar 31 13:57:02 raspberrypi42nd systemd[1]: nagios.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ The unit nagios.service has entered the 'failed' state with result 'exit-code'.
Mar 31 13:57:02 raspberrypi42nd systemd[1]: Failed to start nagios.service - Nagios Core 4.5.9.
░░ Subject: A start job for unit nagios.service has failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ A start job for unit nagios.service has finished with a failure.
░░
░░ The job identifier is 4034 and the job result is failed.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I'm fairly new to Raspberry Pi OS/Linux and VERY new to Nagios. What do I need to be looking at? What logs might tell me what I did wrong?
Any help is appreciated.
What I see when I run journalctl -xeu nagios.service is
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Mar 31 13:57:02 raspberrypi42nd nagios[5965]: Nagios Core 4.5.9
Mar 31 13:57:02 raspberrypi42nd nagios[5965]: Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Mar 31 13:57:02 raspberrypi42nd nagios[5965]: Copyright (c) 1999-2009 Ethan Galstad
Mar 31 13:57:02 raspberrypi42nd nagios[5965]: Last Modified: 2024-12-19
Mar 31 13:57:02 raspberrypi42nd nagios[5965]: License: GPL
Mar 31 13:57:02 raspberrypi42nd nagios[5965]: Website: https://www.nagios.org
Mar 31 13:57:02 raspberrypi42nd nagios[5965]: Reading configuration data...
Mar 31 13:57:02 raspberrypi42nd nagios[5965]: Read main config file okay...
Mar 31 13:57:02 raspberrypi42nd nagios[5965]: Error: Template 'RaspberryPi' specified in host definition could not be not found (config file '>
Mar 31 13:57:02 raspberrypi42nd nagios[5965]: Error: Invalid max_check_attempts value for host 'RaspberryPi42nd'
Mar 31 13:57:02 raspberrypi42nd nagios[5965]: Error: Could not register host (config file '/usr/local/nagios/etc/objects/RPi42.cfg', starting >
Mar 31 13:57:02 raspberrypi42nd nagios[5965]: Error processing object config files!
Mar 31 13:57:02 raspberrypi42nd nagios[5965]: ***> One or more problems was encountered while processing the config files...
Mar 31 13:57:02 raspberrypi42nd nagios[5965]: Check your configuration file(s) to ensure that they contain valid
Mar 31 13:57:02 raspberrypi42nd nagios[5965]: directives and data definitions. If you are upgrading from a previous
Mar 31 13:57:02 raspberrypi42nd nagios[5965]: version of Nagios, you should be aware that some variables/definitions
Mar 31 13:57:02 raspberrypi42nd nagios[5965]: may have been removed or modified in this version. Make sure to read
Mar 31 13:57:02 raspberrypi42nd nagios[5965]: the HTML documentation regarding the config files, as well as the
Mar 31 13:57:02 raspberrypi42nd nagios[5965]: 'Whats New' section to find out what has changed.
Mar 31 13:57:02 raspberrypi42nd systemd[1]: nagios.service: Control process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ An ExecStartPre= process belonging to unit nagios.service has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 1.
Mar 31 13:57:02 raspberrypi42nd systemd[1]: nagios.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ The unit nagios.service has entered the 'failed' state with result 'exit-code'.
Mar 31 13:57:02 raspberrypi42nd systemd[1]: Failed to start nagios.service - Nagios Core 4.5.9.
░░ Subject: A start job for unit nagios.service has failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░
░░ A start job for unit nagios.service has finished with a failure.
░░
░░ The job identifier is 4034 and the job result is failed.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I'm fairly new to Raspberry Pi OS/Linux and VERY new to Nagios. What do I need to be looking at? What logs might tell me what I did wrong?
Any help is appreciated.