Page 1 of 1

Error: Could not find any hostgroup matching windows-servers

Posted: Thu Jun 01, 2017 9:13 am
by deeznutz
Hey guys i have a problem.
I installed my nagios on centos, all worked correctly.
I also added some generic hosts which also worked.
But when im adding windows-servers i get the Error: Could not find any hostgroup matching windows-servers.
I also get this error with the standard windows.cfg. i also created a hostgroup named windows-servers, same error
what can I do?

Re: Error: Could not find any hostgroup matching windows-ser

Posted: Thu Jun 01, 2017 11:29 am
by avandemore
Can you post the full command and output from where you see this message?

Re: Error: Could not find any hostgroup matching windows-ser

Posted: Fri Jun 02, 2017 2:15 am
by deeznutz
[xx@localhost ~]$ sudo /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
[sudo] password for xx:

Nagios Core 4.3.2
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2017-05-09
License: GPL

Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Error: Could not find any hostgroup matching 'windows-servers' (config file '/usr/local/nagios/etc/objects/neu/windows.cfg', starting on line 24)
Error: Failed to process hostgroup names for host 'pcstav' (config file '/usr/local/nagios/etc/objects/neu/windows.cfg', starting at line 24)
Error processing object config files!


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

Re: Error: Could not find any hostgroup matching windows-ser

Posted: Fri Jun 02, 2017 10:23 am
by avandemore
XI > Configure > Core Config Manager > Config File Management > Delete Files > Write Configs > Verify Files > Restart Nagios Core
Older Nagios Versions:
XI > Configure > Core Config Manager > Write Config Files > Delete > Write > Verify > Restart

Does that resolve your issue?

Re: Error: Could not find any hostgroup matching windows-ser

Posted: Fri Jun 02, 2017 10:24 am
by dappa_don
you have not added a hostgroup matching whatever is on that line:

Could not find any hostgroup matching 'windows-servers' (config file '/usr/local/nagios/etc/objects/neu/windows.cfg', starting on line 24)

cretae a hostgroup with the same name.

Re: Error: Could not find any hostgroup matching windows-ser

Posted: Fri Jun 02, 2017 12:04 pm
by avandemore
Can you provide your /usr/local/nagios/etc/nagios.cfg along with any other cfg files it references?

Re: Error: Could not find any hostgroup matching windows-ser

Posted: Fri Jun 02, 2017 12:13 pm
by tgriep
To add the missing hostgroup to your system, edit this file

Code: Select all

/usr/local/nagios/etc/objects/neu/windows.cfg
And add the hostgroup to it like the example below.

Code: Select all

# Define a hostgroup for Windows machines
# All hosts that use the windows-server template will automatically be a member of this group

define hostgroup{
        hostgroup_name  windows-servers ; The name of the hostgroup
        alias           Windows Servers ; Long name of the group
        }
Save the file and restart the nagios process by running

Code: Select all

service nagios restart
As long as there are no other configuration errors, the nagios process should start up.