Page 1 of 2

One Windows machine at a time?

Posted: Mon Jan 06, 2014 3:11 pm
by 4430salton
Hello Nagios experts,

I have installed and have working Nagios version 3.5.1. I have configured at least 5 windows .cfg files and have them defined in nagios,cfg file. My problem is I can only see one windows computer at a time?!? If I delete the pound sign on more than one, then I get the error "Running configuration check...... CONFIG ERROR! Restart aborted. Check your Nagios configuration." after I do the recompile "service nagios restart"

# Definitions for monitoring a Windows machine
#cfg_file=/etc/nagios/objects/windows.cfg
#cfg_file=/etc/nagios/objects/tbd-1wefrg.cfg
#cfg_file=/etc/nagios/objects/tbdwwdsxrf5.cfg
#cfg_file=/etc/nagios/objects/tbd-gwer53.cfg
cfg_file=/etc/nagios/objects/tbd-1wds34tg.cfg

I can delete the pound sign on each of the above .cfg files, one at a time, but if I do more than one then it errors out. What am I doing wrong or what did I forget? Thanks for your help!

Re: One Windows machine at a time?

Posted: Mon Jan 06, 2014 3:18 pm
by tmcdonald
Can you post the last 50 or so lines of the configuration check output?

Re: One Windows machine at a time?

Posted: Mon Jan 06, 2014 4:38 pm
by 4430salton
sorry not that familiar with your request, do you want to see the nagios.log file?

Re: One Windows machine at a time?

Posted: Mon Jan 06, 2014 4:41 pm
by abrist
Post the output of the following in code wraps:

Code: Select all

usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Re: One Windows machine at a time?

Posted: Mon Jan 06, 2014 4:48 pm
by 4430salton
I am still learning about nagios and linux.

Is this what you want?

ran the command from where nagios installed itself...which was /etc/nagios
---------------------------------
Processing object config file '/etc/nagios/objects/tbd-g8217k1.cfg'...
Processing object config file '/etc/nagios/objects/tbd-bxd4zd1.cfg'...
Warning: Duplicate definition found for hostgroup 'windows-servers' (config file '/etc/nagios/objects/tbd-bxd4zd1.cfg', starting on line 47)
Error: Could not add object property in file '/etc/nagios/objects/tbd-bxd4zd1.cfg' on line 48.
Error processing object config files!


***> One or more problems was encountered while processing the config files...

Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.
---------------------------------

Re: One Windows machine at a time?

Posted: Mon Jan 06, 2014 4:54 pm
by slansing
Please attach the config file named "tbd-bxd4zd1.cfg"

Re: One Windows machine at a time?

Posted: Mon Jan 06, 2014 4:55 pm
by 4430salton
the command I ran was

/etc/nagios/nagios -v /etc/nagios/nagios.cfg

that is what you were wanting correct?

Re: One Windows machine at a time?

Posted: Mon Jan 06, 2014 4:59 pm
by sreinhardt
Yes that is what we needed initially, now we would like to see the configuration file listed above as it is causing duplicate entry issues and errors.

Re: One Windows machine at a time?

Posted: Mon Jan 06, 2014 5:04 pm
by 4430salton
I was trying to keep actual computer names anonymous. hold on

Re: One Windows machine at a time?

Posted: Mon Jan 06, 2014 5:22 pm
by 4430salton
sorry for not getting back sooner. but I found the problem with that file. the problem is the hostgroup called 'windows-servers' if I have that named in other windows .cfg files it wont compile. i put the pound sign in and disable hostgroups in the other cfg files and eventually everything will compile. i know this is not good nagios mgmt but I am trying to learn Centos and Nagios at the same time and it can be a bit challenging. maybe you can point in the direction of a good explanation of how to create hostgroups correctly?