FIXED – Checking config for nagios: Configuration validation failed[FAILED]

Checking config for nagios: Configuration validation failed[FAILED]

I got this error when i tried to take a host out of nagios configuration, after simply removing the host conf file , and i knew i have to delete from the services configuration as well but couldn’t find which service the host were added to .

fount this solution , you simply check your conf file with below command to fix the error. very handy

 

nagios -v /etc/nagios/nagios.cfg

 

Found the error

Error: Could not find any host matching ‘stratos.ajayadas.com’ (config file ‘/etc/nagios/services/linux1.cfg’, starting on line 14)
Error: Could not expand hostgroups and/or hosts specified in service (config file ‘/etc/services/linux1.cfg’, starting on line 14)
Error processing object config files!

 

as you know which line the error is , it’s a piece of cake to fix it!…