Page 1 of 1

Error with Nagios configuration testing

Posted: Fri Jan 26, 2018 6:26 am
by escarter
Hello all,
Can someone please assist me on this? I am a newbie to Nagios, Installed the nagios core, created and updated some config files but when i ran the test configuration command i get the error below.

Code: Select all

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

Code: Select all

Error: Could not find any host matching '$HOSTNAME$' (config file '/usr/local/nagios/etc/objects/services/local-clock-offset.cfg', starting on line 2)
Error: Failed to expand host list '$HOSTNAME$' for service 'local-clock-offset' (/usr/local/nagios/etc/objects/services/local-clock-offset.cfg:2)
   Error processing object config files!

Please need help :(

Re: Error with Nagios configuration testing

Posted: Fri Jan 26, 2018 3:33 pm
by dwhitfield
It looks like you're calling a hostname that doesn't actually have a hostname.

Please post the two following files:
/usr/local/nagios/etc/objects/services/local-clock-offset.cfg
/usr/local/nagios/etc/nagios.cfg