HostGroups and Configuring Services
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: HostGroups and Configuring Services
Fantastic! If it doesn't happen today, we're here every week day. No hurry.
-
rbizzell39
- Posts: 112
- Joined: Thu Dec 17, 2015 1:24 pm
Re: HostGroups and Configuring Services
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
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: HostGroups and Configuring Services
Absolutely! That's why hostgroups exist!
-
rbizzell39
- Posts: 112
- Joined: Thu Dec 17, 2015 1:24 pm
Re: HostGroups and Configuring Services
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
-
rbizzell39
- Posts: 112
- Joined: Thu Dec 17, 2015 1:24 pm
Re: HostGroups and Configuring Services
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
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
-
rbizzell39
- Posts: 112
- Joined: Thu Dec 17, 2015 1:24 pm
Re: HostGroups and Configuring Services
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
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: HostGroups and Configuring Services
Please post your updated configs so we can see what is going on.
Separate config files are not necessary.
Separate config files are not necessary.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
rbizzell39
- Posts: 112
- Joined: Thu Dec 17, 2015 1:24 pm
Re: HostGroups and Configuring Services
# '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
}
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
}
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: HostGroups and Configuring Services
Try removing the comma , and try again.rbizzell39 wrote:Code: Select all
members AT-TFS-BUILD001,
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
rbizzell39
- Posts: 112
- Joined: Thu Dec 17, 2015 1:24 pm
Re: HostGroups and Configuring Services
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
}
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
}