Page 1 of 1

Issue with client config files

Posted: Fri May 31, 2013 8:55 am
by Deadringers
Hi all,

I am struggling with this one - I can create all the hosts I want under the windows host file:
/etc/nagios/objects/windows.cfg

But soon as I create hosts under:
/etc/nagios/servers/
/etc/nagios/servers/DC1.cfg
/etc/nagios/servers/Exchange1.cfg


it goes to pot. Says that there is a config error?

I have tried to remove the windows.cfg file from the nagios config file and just use the server dir but still errors.

Only way to get my hosts into monitoring is to put them all along with their service checks into this windows.cfg file...

Messy to say the least as this produces a huggeee long file.


Can someone point me in the right direction for this one?

Re: Issue with client config files

Posted: Fri May 31, 2013 9:56 am
by abrist
When splitting up a large file into smaller ones, it is to be expected that you may have a syntax error or two. Use the command:

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
To drill down where the problem is and fix that config. Then run the verify again, and repeat until all errors are corrected.

Re: Issue with client config files

Posted: Fri May 31, 2013 10:26 am
by Deadringers
Thanks for that I'll give it a try over the weekend.

Re: Issue with client config files

Posted: Fri May 31, 2013 10:29 am
by abrist
No problem, let us know. We do not usually answer much over the weekend, so you may not hear from us until Monday, though there are a number of kind hearted MVPs on the forum who may beat us to the punch.

Re: Issue with client config files

Posted: Sun Jun 02, 2013 4:13 am
by Deadringers
I don't understand your command there...I have nagios and it's files installed to /etc/nagios/


And I have copied the 1 large config file to my FTP server - then used notepad + to break it down into several smaller files.

I then change the nagios config file to not look at the windows object file (the large one) but just look at nagios/servers instead and grab the cfg files from there...no luck! :(

I cannot see anything that I am doing wrong.

Re: Issue with client config files

Posted: Mon Jun 03, 2013 12:01 pm
by slansing
The big thing here is you need to have a fully intact nagios.cfg file, then you must find your nagios bin and use the -v flag passing the configuration file location afterwords, this allows you to verify the integrity of your configurations.

You will need to change the command to the paths you have on your system which it sounds like are already heavily modified "not suggested in this capacity."