Page 2 of 5

Re: Ram disk and config errors

Posted: Mon Oct 13, 2014 1:58 pm
by jbennett
Yes. The warnings are still present. Just to verify:

Code: Select all

Nagios Core 4.0.8 
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors 
Copyright (c) 1999-2009 Ethan Galstad 
Last Modified: 08-12-2014 
License: GPL 

Website: http://www.nagios.org 
Reading configuration data... 
Read main config file okay... 
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in host type objects (config file '/usr/local/nagios/etc/hosttemplates.cfg', starting at line 40) 
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in host type objects (config file '/usr/local/nagios/etc/hosttemplates.cfg', starting at line 285) 
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in host type objects (config file '/usr/local/nagios/etc/hosttemplates.cfg', starting at line 314) 
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in service type objects (config file '/usr/local/nagios/etc/servicetemplates.cfg', starting at line 64) 
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in service type objects (config file '/usr/local/nagios/etc/servicetemplates.cfg', starting at line 103) 
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in service type objects (config file '/usr/local/nagios/etc/servicetemplates.cfg', starting at line 368) 
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in service type objects (config file '/usr/local/nagios/etc/servicetemplates.cfg', starting at line 401) 
Read object config files okay... 

Running pre-flight check on configuration data... 

Checking objects... 
Checked 22584 services. 
Checked 955 hosts. 
Checked 181 host groups. 
Checked 4 service groups. 
Checked 23 contacts. 
Checked 5 contact groups. 
Checked 137 commands. 
Checked 31 time periods. 
Checked 0 host escalations. 
Checked 0 service escalations. 
Checking for circular paths... 
Checked 955 hosts 
Checked 0 service dependencies 
Checked 0 host dependencies 
Checked 31 timeperiods 
Checking global event handlers... 
Checking obsessive compulsive processor commands... 
Checking misc settings... 

Total Warnings: 0 
Total Errors: 0 

Things look okay - No serious problems were detected during the pre-flight check 

Re: Ram disk and config errors

Posted: Mon Oct 13, 2014 2:07 pm
by jbennett
I'm still stumped as to why I can have a contact group set under the alerts tab in a template and it not accept it as the contact group?

It appears that I must have the contact group manually set under each and every host and service, not just under the templates which is how I believe I had it initially.

What am I doing wrong here?

Re: Ram disk and config errors

Posted: Mon Oct 13, 2014 2:18 pm
by Box293
I will get back to you on the failure_prediction_enabled, I need to get a command from a dev so we can remove it from the database.
jbennett wrote:I'm still stumped as to why I can have a contact group set under the alerts tab in a template and it not accept it as the contact group?
On your template, when you select the contact group, have you selected the + radio button?

Also, if you find the service definition in /usr/local/nagios/var/objects.cache does it have the contact group defined here?

Re: Ram disk and config errors

Posted: Mon Oct 13, 2014 2:34 pm
by jbennett
Box293 wrote:On your template, when you select the contact group, have you selected the + radio button?
Nope! This was set to standard. I don't recall changing this previously. Where can I find the meanings of these options?

However, I did select this for two of the templates to test it out, then went to write the configs and it's still showing the same warnings.
Also, if you find the service definition in /usr/local/nagios/var/objects.cache does it have the contact group defined here?
I'm seeing contact groups, hosts, service definitions, etc. that have all been removed and/or had their names changed over a year ago but they're still showing up in the objects.cache file. I'm guessing this is the root cause of the issue?

It seems that objects.cache isn't updating with the latest configs??

Re: Ram disk and config errors

Posted: Mon Oct 13, 2014 2:52 pm
by Box293
jbennett wrote:Nope! This was set to standard. I don't recall changing this previously. Where can I find the meanings of these options?
OK lets set it to + as I believe this is what is needed. The meanings for these options are found in the Documentation drop down list (top right when editing an object).

jbennett wrote:However, I did select this for two of the templates to test it out, then went to write the configs and it's still showing the same warnings.
The warnings have nothing to do with the contact options, lets just ignore them for the minute. I am waiting for a dev to get back to me with some commands so we can remove them from the database.
jbennett wrote:
Also, if you find the service definition in /usr/local/nagios/var/objects.cache does it have the contact group defined here?
I'm seeing contact groups, hosts, service definitions, etc. that have all been removed and/or had their names changed over a year ago but they're still showing up in the objects.cache file. I'm guessing this is the root cause of the issue?

It seems that objects.cache isn't updating with the latest configs??
The cache file is (re)created every time Nagios is (re)started.

I am only interested in the object of the service that uses the template with the contact group defined. Does it have the contact group being used?

What is the output of:

Code: Select all

ls -al /usr/local/nagios/var/objects.cache

Re: Ram disk and config errors

Posted: Mon Oct 13, 2014 3:34 pm
by jbennett
Box293 wrote:OK lets set it to + as I believe this is what is needed. The meanings for these options are found in the Documentation drop down list (top right when editing an object).
I don't see anything regarding the contactgroup options section of the contactgroups window?
Box293 wrote:
jbennett wrote:
Box293 wrote:Also, if you find the service definition in /usr/local/nagios/var/objects.cache does it have the contact group defined here?
I'm seeing contact groups, hosts, service definitions, etc. that have all been removed and/or had their names changed over a year ago but they're still showing up in the objects.cache file. I'm guessing this is the root cause of the issue?

It seems that objects.cache isn't updating with the latest configs??
The cache file is (re)created every time Nagios is (re)started.

I am only interested in the object of the service that uses the template with the contact group defined. Does it have the contact group being used?
Yes, but it's an old contact group that no longer exists. See below though, I'm utilizing the ramdisk, so this specific objects.cache is no longer in use.
Box293 wrote:What is the output of:

Code: Select all

ls -al /usr/local/nagios/var/objects.cache

Code: Select all

-rw-r--r-- 1 nagios nagios 4025755 Jul 20  2011 /usr/local/nagios/var/objects.cache
I am utilizing a ramdisk though, so this should be under /var/nagiosramdisk instead, correct?

Code: Select all

# ls -al /var/nagiosramdisk/objects.cache
-rw-r--r-- 1 nagios nagios 24379982 Oct 13 14:24 /var/nagiosramdisk/objects.cache
When I search this file for the hosts that are throwing the error in the configs, there are no contact groups. I should note that all of the errors that are being thrown in the config check are from hosts.

Here's another oddity: I have a number of hosts that are showing up in the config check with this warning and another handfull of hosts that are not showing up. However, from what I can tell, both handfulls of hosts are identical in their configs for the alert contacts and contact groups - meaning, they are blank. So, in short, it seems that all things being equal - some hosts are throwing this warning and some aren't. Something must be off and/or I'm completely overlooking something here.

Re: Ram disk and config errors

Posted: Mon Oct 13, 2014 3:58 pm
by jbennett
UPDATE: I have traced this back to simply going into any of the hosts that are throwing the warning via the CCM. I don't have to change a thing. All I do is hit save and then apply the config. The host then drops off of the warning list when I verify the config.

Is this a bug or is this indicitative of something else going on?

Re: Ram disk and config errors

Posted: Mon Oct 13, 2014 4:14 pm
by Box293
When you click save it forces the config to be written during the next apply. Otherwise Apply will simply not update the config file on the disk to save processing time.

Does this solve your contacts issue?

Re: Ram disk and config errors

Posted: Tue Oct 14, 2014 10:01 am
by jbennett
Unfortunately, it does not.

I am not changing anything when I open the host or the service. I am simply opening it and clicking save. I can do this and then immediately apply the configs and it will then be removed from the list of warnings when I verify configs.

Re: Ram disk and config errors

Posted: Wed Oct 15, 2014 9:24 am
by Box293
Do you have customer support? I would like to move this to out ticketing system. If you are please email [email protected] and we'll be able to get on top of this.

If not can you please post the configs of the objects that are not getting the correct contact options.