This article covers fixes to this Nagios Configuration failed problem.
When you click the Show Errors link a message is shown that indicates the problem in the config files along with a line number for the config file. However when looking at the config file in a text editor, the line number does not appear to relate to the problem.
The Apply Configuration process is as follows:
i. New config files are temporarily written to disk
ii. Nagios verifies the config files are valid
iii. Temporary config files are made permanent
iv. Nagios service is restarted
When the verification step fails, the temporary files are discarded. Hence when you go to look at the file to look at the line number it references it is not valid as the temporary files now longer exist.
To fix Nagios Configuration Problem:
1. Open CCM
2. Tools > Config File Management
3. Click the Delete Files button
4. It will say "Successfully deleted all Host / Service Config Files"
5. Click the Write Configs Button
5. It will show an output of all the files it creates, in large deployments this step may take a long time .
6. Click the Verify Files button
7. The output should end with the error message you have experienced previously.
At this point, you can open an SSH session to your Nagios XI server and open the file in a text editor to investigate the problem.