Page 1 of 1

Having checks error after some changes

Posted: Thu Jan 24, 2019 11:46 am
by shamrozkadiwal
Hey All, I am getting this error when I was trying to commented out few hosts and services. Since then this error has been sitting there and not going. I tried so many thing but still not able to find where is it coming from. I was trying to commented out ddb900 and ddb901 servers from service and host and started getting this error

I have attached few configuration files if you need look into it

Code: Select all

[shkadi@ams900 hosts]$ sudo /usr/sbin/nagios -v /etc/nagios/nagios.cfg

Nagios Core 3.5.1
Copyright (c) 2009-2011 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-30-2013
License: GPL

Website: http://www.nagios.org
Reading configuration data...
   Read main config file okay...
Processing object config file '/etc/nagios/objects/commands.cfg'...
Processing object config file '/etc/nagios/objects/contacts.cfg'...
Processing object config file '/etc/nagios/objects/timeperiods.cfg'...
Processing object config directory '/etc/nagios/hosts'...
Processing object config file '/etc/nagios/hosts/ddx900.cfg'...
Processing object config file '/etc/nagios/hosts/eft_hosts.cfg'...
Processing object config file '/etc/nagios/hosts/ddx901.cfg'...
Processing object config file '/etc/nagios/hosts/hostgroups.cfg'...
Processing object config file '/etc/nagios/hosts/adx903.cfg'...
Processing object config directory '/etc/nagios/services'...
Processing object config file '/etc/nagios/services/eft-services.cfg'...
Processing object config file '/etc/nagios/services/servicegroups.cfg'...
Error: Could not expand hostgroups and/or hosts specified in service (config file '/etc/nagios/services/eft-services.cfg', starting on line 239)
   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.

[shkadi@ams900 hosts]$

Re: Having checks error after some changes

Posted: Thu Jan 24, 2019 11:58 am
by scottwilkerson
In eft-services.cfg you have a service that is assigned to the D-drive_snmp hostgroup.

If commenting out these hosts, makes this hostgroup empty, you cannot assign the hostgroup to a service

Re: Having checks error after some changes

Posted: Fri Jan 25, 2019 11:13 am
by shamrozkadiwal
Scott, I really appreciate your help and I resolve the issue.

Re: Having checks error after some changes

Posted: Fri Jan 25, 2019 4:49 pm
by cdienger
Glad to hear!