Login

Home Forum
Welcome, Guest
Please Login or Register.    Lost Password?

service groups not aware of inactive host/service
(1 viewing) (1) Guest
Go to bottomPage: 12
TOPIC: service groups not aware of inactive host/service
#780
service groups not aware of inactive host/service 1 Year, 5 Months ago Karma: 0
Greetings all,

I have a host that is not active but it had (or has) services that are members of service groups. When running the 'Check configuration files' I get these errors:

Error: Could not find a service matching host name 'xxxxxxx' and description 'uptime' (config file '/usr/local/nagios/etc/nagiosql/servicegroups.cfg', starting on line 35)
Error: Could not expand member services specified in servicegroup (config file '/usr/local/nagios/etc/nagiosql/servicegroups.cfg', starting on line 35)

To work around this I can activate the host or remove it's host group memberships (which is where it's services get applied). When temporarily disabling a host it would be much simpler to be able to just uncheck the 'active' check box and leave it's config intact. Is this functionality by design or is this a bug? If it's a bug I can submit a bug report, if by design I can live with it but would like to see it the service group logic be able to handle this situation. Thanks again for all the hard work, you've moved Nagios configuration much closer to trivial for us.

-greg
gjfrater
Junior Boarder
Posts: 20
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2009/04/02 00:04 By gjfrater.
The administrator has disabled public write access.
 
#781
Re:service groups not aware of inactive host/service 1 Year, 5 Months ago Karma: 5
If you deactivate a host, you should also rewrite all configuration files which are using that host.

Al long as you don't refresh your hostgroup.cfg file Nagios uses the old version with the inactive host in it. NagiosQL does not write out inactive Hosts - it removes the configuration file of them but keep the data in the database.
martin
NagiosQL Founder
Posts: 307
graph
User Offline Click here to see the profile of this user
Last Edit: 2009/04/02 07:30 By martin.
The administrator has disabled public write access.
 
#789
Re:service groups not aware of inactive host/service 1 Year, 5 Months ago Karma: 0
On my system the problem occurs even after writing all of the config files out. It only seems to effect the servicegroups.cfg. Nagios does not complain about the hostgroups.cfg just the servicegroups.cfg.

NagiosQL 3.0.2
Nagios 3.0.6
gjfrater
Junior Boarder
Posts: 20
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#790
Re:service groups not aware of inactive host/service 1 Year, 5 Months ago Karma: 5
Can you Check the config files manually and look what is wrong?

Based on your description, we are not able to reproduce this issue.
martin
NagiosQL Founder
Posts: 307
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#806
Re:service groups not aware of inactive host/service 1 Year, 5 Months ago Karma: 0
Okay, I've figured it out. On my system (nagios 3.0.6 and nagiosql 3.0.2) when deactiviting a host the host config logic works (i.e. the host config files are not written for the deactivated host). However the hostgroup.cfg and servicegroup.cfg files that are written still have references to the deactivated host if the host/service group had any members directives with the deactivate host in them. If I change my hostgroup/servicegroup configs to not have the deactivated host in any of their 'members' directives then it will pass the nagios config check without error. I hope that makes sense and is helpful.

Thanks,

-greg
gjfrater
Junior Boarder
Posts: 20
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#810
Re:service groups not aware of inactive host/service 1 Year, 5 Months ago Karma: 5
Can you check again, if the file system file date from hostgroup.cfg and servicegroup.cfg is before or after the host modification.

It is very essential to know, that the cfg's are written out in real or if the write command is wrong and the files are still the old ones.

Be aware, we have two write commands inside the control page - one for hosts, services, hostgroups and servicegroups and one for all other files. If you only use the command for all other files, the group files were not written out!

The export script is the same for every script, so it is in fact not possible, that only 2 types of files are wrong and all others are correct
martin
NagiosQL Founder
Posts: 307
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 12