When removing # from windows.cfg > CONFIG ERROR


Hello everyone,

this is my first post, and I’m pretty sure someone must have ran into it… but I have no idea how to look for it:

When I adjust my nagios.cfg file, to add windows monitoring, I get the following error:
Running configuration check… CONFIG ERROR! Reload aborted. Check your Nagios configuration.

When I add the # again, all works fine again. Default monitoring of the localhost works fine. I adjusted my windows .cfg so it contains the right local ip address. Can anyone help me out here please??
The line I’m unquoting is:

Definitions for monitoring a Windows machine


I didn’t adjust anything, other then trying to remove the #.


You are removing the # from the SECOND LINE ONLY, right? Not from the “Definitions for monitoring…” line. That is a comment and needs to stay commented out.

Also, is your WINDOWS.CFG located in /usr/local/nagios/etc/objects ??



Hello JTPanther,

thanks for the reply. Yes I was removing it from the 2nd line, and the file exists indeed in that folder. Strange thing is, if I remove the # in front of the monitoring for switches, it works, but when I just change the IP to my router, then it fails again…



I think you should try to run:
nagios-dir/bin/nagios -v nagios-dir/etc/nagios.cfg

this command will check your config (just the same as “Running configuration check” does), but will display or tell you where the error is found…

It will then be easier to troubleshoot your problem. Don’t hesitate to ask here if you don’t understand the output or else :slight_smile:


Ok, I’ll do that as fast as possible, but I’m gone for the rest of the week, so, then answer will cone saturday :wink:



Hello Hello,

I’m back… and it works… thanks to the -v option… i found I missed a hostname :slight_smile: