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?
Issue with client config files
Re: Issue with client config files
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:
To drill down where the problem is and fix that config. Then run the verify again, and repeat until all errors are corrected.
Code: Select all
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfgFormer Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
-
Deadringers
- Posts: 18
- Joined: Fri May 31, 2013 5:32 am
Re: Issue with client config files
Thanks for that I'll give it a try over the weekend.
Re: Issue with client config files
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.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
-
Deadringers
- Posts: 18
- Joined: Fri May 31, 2013 5:32 am
Re: Issue with client config files
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.
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.
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Issue with client config files
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."
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."