Page 2 of 3

Re: HostGroups and Configuring Services

Posted: Mon Oct 10, 2016 12:10 pm
by dwhitfield
Fantastic! If it doesn't happen today, we're here every week day. No hurry.

Re: HostGroups and Configuring Services

Posted: Mon Oct 10, 2016 12:15 pm
by rbizzell39
Thanks I have configured nagios to work by adding individual host but that gets to be too much when you need to add alot of host so that is why I am hoping to get this figured out and thanks for your help and quick responses

Re: HostGroups and Configuring Services

Posted: Mon Oct 10, 2016 12:57 pm
by dwhitfield
Absolutely! That's why hostgroups exist!

Re: HostGroups and Configuring Services

Posted: Mon Oct 10, 2016 1:15 pm
by rbizzell39
I removed the contact group but this part isn't clear where you said to add hostgroup to the host and create a contact group

Re: HostGroups and Configuring Services

Posted: Mon Oct 10, 2016 1:49 pm
by rbizzell39
Reading configuration data...
Read main config file okay...
Error: Could not find any host matching 'TFS-BUILD001' (config file '/usr/local/nagios/etc/objects/hostgroups.cfg', starting on line 5)
Error: Could not expand members specified in hostgroup (config file '/usr/local/nagios/etc/objects/hostgroups.cfg', starting on line 5)
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.
This host is added as a member in the hostgroup and I removed the contacts group from the hostgroup.cfg

Re: HostGroups and Configuring Services

Posted: Mon Oct 10, 2016 1:53 pm
by rbizzell39
Do I need to have another config file with the individual host or having the host in the hostgroup file is okay. It can't find the host even though the host is in the hostgroup.cfg

Re: HostGroups and Configuring Services

Posted: Mon Oct 10, 2016 4:35 pm
by Box293
Please post your updated configs so we can see what is going on.

Separate config files are not necessary.

Re: HostGroups and Configuring Services

Posted: Tue Oct 11, 2016 7:44 am
by rbizzell39
# 'Windows' host group definition
define hostgroup{
hostgroup_name Windows Servers
alias Windows Servers
members AT-TFS-BUILD001,
}



# define service



define service{
use generic-service
hostgroup_name Windows Servers
service_description NSClient++ 0.4.1.73 Version
check_command check_nt!CLIENTVERSION
}

Re: HostGroups and Configuring Services

Posted: Tue Oct 11, 2016 4:14 pm
by Box293
rbizzell39 wrote:

Code: Select all

members AT-TFS-BUILD001,
Try removing the comma , and try again.

Re: HostGroups and Configuring Services

Posted: Wed Oct 12, 2016 8:12 am
by rbizzell39
I removed the comma and I get the same error

agios Core 4.2.1
Copyright (c) 2009-present Nagios Core Development Team and Community Contributo rs
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 09-06-2016
License: GPL

Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Error: Could not find any host matching 'AT-TFS-BUILD001' (config file '/usr/loc al/nagios/etc/objects/hostgroups.cfg', starting on line 5)
Error: Could not expand members specified in hostgroup (config file '/usr/local/ nagios/etc/objects/hostgroups.cfg', starting on line 5)
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.
hostgroups.cfg

# 'Windows' host group definition
define hostgroup{
hostgroup_name Windows Servers
alias Windows Servers
members AT-TFS-BUILD001
}



# define service



define service{
use generic-service
hostgroup_name Windows Servers
service_description NSClient++ 0.4.1.73 Version
check_command check_nt!CLIENTVERSION
}