Error with Nagios configuration testing

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
escarter
Posts: 1
Joined: Fri Jan 26, 2018 6:17 am

Error with Nagios configuration testing

Post 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 :(
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Error with Nagios configuration testing

Post 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
Locked