Error: Template 'linux-server' specified in host definition
Posted: Thu Oct 25, 2018 11:11 am
Hi All
Nagios Core (nagios3) on Ubuntu 16.04
I'm a bit new to Nagios - dabbled a little but still just learning.
I've got a problem with Nagios core whereby I cannot make changes to the nagios.cfg file and restart the service without errors. With no changes I have the local host monitored as you'd expect from default.
After a few attempts at troubleshooting I am at the stage where I've hit a wall. journalctl -xe seems to suggest that the 'Linux-Server' Template is missing. Where would this normally be stored and how could I reinstall it without reinstalling Nagios.
Thanks
Here is the end snippet from : journalctl -xe
Oct 25 16:00:31 nagios3[24351]: Processing object config file '/etc/nagios3/conf.d/hostgroups_nagios2.cfg'...
Oct 25 16:00:31 nagios3[24351]: Processing object config file '/etc/nagios3/objects/servers.cfg'...
Oct 25 16:00:31 i nagios3[24351]: Error: Template 'linux-server' specified in host definition could not be not found (config file '/etc/nagios3/objects/servers.cfg', starting on line 40)
Oct 25 16:00:31 nagios3[24351]: Error processing object config files!
Oct 25 16:00:31 nagios3[24351]: ***> One or more problems was encountered while processing the config files...
Oct 25 16:00:31 nagios3[24351]: Check your configuration file(s) to ensure that they contain valid
Oct 25 16:00:31 nagios3[24351]: directives and data defintions. If you are upgrading from a previous
Oct 25 16:00:31 nagios3[24351]: version of Nagios, you should be aware that some variables/definitions
Oct 25 16:00:31 systemd[1]: nagios3.service: Control process exited, code=exited status=1
Oct 25 16:00:31 nagios3[24351]: may have been removed or modified in this version. Make sure to read
Oct 25 16:00:31 nagios3[24351]: the HTML documentation regarding the config files, as well as the
Oct 25 16:00:31 nagios3[24351]: 'Whats New' section to find out what has changed.
Oct 25 16:00:31 systemd[1]: Failed to start LSB: nagios host/service/network monitoring and management system.
-- Subject: Unit nagios3.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/li ... temd-devel
--
-- Unit nagios3.service has failed.
--
-- The result is failed.
Oct 25 16:00:31 nagios3[24351]: * errors in config!
Oct 25 16:00:31 nagios3[24351]: ...fail!
Oct 25 16:00:31 sudo[24345]: pam_unix(sudo:session): session closed for user root
Oct 25 16:00:31 systemd[1]: nagios3.service: Unit entered failed state.
Oct 25 16:00:31 systemd[1]: nagios3.service: Failed with result 'exit-code'.
Nagios Core (nagios3) on Ubuntu 16.04
I'm a bit new to Nagios - dabbled a little but still just learning.
I've got a problem with Nagios core whereby I cannot make changes to the nagios.cfg file and restart the service without errors. With no changes I have the local host monitored as you'd expect from default.
After a few attempts at troubleshooting I am at the stage where I've hit a wall. journalctl -xe seems to suggest that the 'Linux-Server' Template is missing. Where would this normally be stored and how could I reinstall it without reinstalling Nagios.
Thanks
Here is the end snippet from : journalctl -xe
Oct 25 16:00:31 nagios3[24351]: Processing object config file '/etc/nagios3/conf.d/hostgroups_nagios2.cfg'...
Oct 25 16:00:31 nagios3[24351]: Processing object config file '/etc/nagios3/objects/servers.cfg'...
Oct 25 16:00:31 i nagios3[24351]: Error: Template 'linux-server' specified in host definition could not be not found (config file '/etc/nagios3/objects/servers.cfg', starting on line 40)
Oct 25 16:00:31 nagios3[24351]: Error processing object config files!
Oct 25 16:00:31 nagios3[24351]: ***> One or more problems was encountered while processing the config files...
Oct 25 16:00:31 nagios3[24351]: Check your configuration file(s) to ensure that they contain valid
Oct 25 16:00:31 nagios3[24351]: directives and data defintions. If you are upgrading from a previous
Oct 25 16:00:31 nagios3[24351]: version of Nagios, you should be aware that some variables/definitions
Oct 25 16:00:31 systemd[1]: nagios3.service: Control process exited, code=exited status=1
Oct 25 16:00:31 nagios3[24351]: may have been removed or modified in this version. Make sure to read
Oct 25 16:00:31 nagios3[24351]: the HTML documentation regarding the config files, as well as the
Oct 25 16:00:31 nagios3[24351]: 'Whats New' section to find out what has changed.
Oct 25 16:00:31 systemd[1]: Failed to start LSB: nagios host/service/network monitoring and management system.
-- Subject: Unit nagios3.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/li ... temd-devel
--
-- Unit nagios3.service has failed.
--
-- The result is failed.
Oct 25 16:00:31 nagios3[24351]: * errors in config!
Oct 25 16:00:31 nagios3[24351]: ...fail!
Oct 25 16:00:31 sudo[24345]: pam_unix(sudo:session): session closed for user root
Oct 25 16:00:31 systemd[1]: nagios3.service: Unit entered failed state.
Oct 25 16:00:31 systemd[1]: nagios3.service: Failed with result 'exit-code'.