Error: Could not find any hostgroup matching windows-servers

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.
Locked
deeznutz
Posts: 2
Joined: Thu Jun 01, 2017 9:06 am

Error: Could not find any hostgroup matching windows-servers

Post 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?
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

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

Post by avandemore »

Can you post the full command and output from where you see this message?
Previous Nagios employee
deeznutz
Posts: 2
Joined: Thu Jun 01, 2017 9:06 am

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

Post 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...
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

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

Post 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?
Previous Nagios employee
dappa_don
Posts: 8
Joined: Tue May 30, 2017 9:57 am

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

Post 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.
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

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

Post by avandemore »

Can you provide your /usr/local/nagios/etc/nagios.cfg along with any other cfg files it references?
Previous Nagios employee
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

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

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked