One Windows machine at a time?

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
4430salton
Posts: 9
Joined: Thu Aug 11, 2011 8:19 am

One Windows machine at a time?

Post 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!
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: One Windows machine at a time?

Post by tmcdonald »

Can you post the last 50 or so lines of the configuration check output?
Former Nagios employee
4430salton
Posts: 9
Joined: Thu Aug 11, 2011 8:19 am

Re: One Windows machine at a time?

Post by 4430salton »

sorry not that familiar with your request, do you want to see the nagios.log file?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: One Windows machine at a time?

Post 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
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.
4430salton
Posts: 9
Joined: Thu Aug 11, 2011 8:19 am

Re: One Windows machine at a time?

Post 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.
---------------------------------
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: One Windows machine at a time?

Post by slansing »

Please attach the config file named "tbd-bxd4zd1.cfg"
4430salton
Posts: 9
Joined: Thu Aug 11, 2011 8:19 am

Re: One Windows machine at a time?

Post by 4430salton »

the command I ran was

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

that is what you were wanting correct?
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: One Windows machine at a time?

Post 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.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
4430salton
Posts: 9
Joined: Thu Aug 11, 2011 8:19 am

Re: One Windows machine at a time?

Post by 4430salton »

I was trying to keep actual computer names anonymous. hold on
4430salton
Posts: 9
Joined: Thu Aug 11, 2011 8:19 am

Re: One Windows machine at a time?

Post 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?
Locked