Page 1 of 2
Lost services when upgrade failed
Posted: Fri Jun 13, 2014 3:19 pm
by rickwilson7425
I tried to run the upgrade from 2014R1.0 to R1.1 and it failed.
I restored from tape backup but now I only have a few services displaying whereas I had about 40 or so before. This is on my test migration system so fortunately there aren't that many active servers or services on it.
The write and verify of configuration come up clean but it only writes 8 services for 10 hosts. The hosts and all their services are marked as active in CCM.
Re: Lost services when upgrade failed
Posted: Sun Jun 15, 2014 3:36 pm
by Box293
Try deleting all the host and service definition flat files.
Code: Select all
rm -f /usr/local/nagios/etc/services/*.cfg
rm -f /usr/local/nagios/etc/hosts/*.cfg
Once you've done this, go into CCM and under Quick tools click Apply Configuration (this will re-create all of the host and service definition flat files).
Did this fix your problem?
Re: Lost services when upgrade failed
Posted: Tue Jun 17, 2014 9:13 am
by rickwilson7425
That did not help.
Odd thing about this is that I can use the Write Config tool and I get no errors. If I use the Apply Configuration tool it fails.
Re: Lost services when upgrade failed
Posted: Tue Jun 17, 2014 9:59 am
by slansing
What does the apply configuration tell you specifically when it errors out? There is a possibility that it is spitting out a DB error as opposed to a configuration error.
Re: Lost services when upgrade failed
Posted: Tue Jun 17, 2014 10:35 am
by rickwilson7425
It says:
Applying Configuration
Command submitted for processing...
Waiting for configuration verification.................................................................
Configurations failed to write to file.
An error occurred while attempting to apply your configuration to Nagios Core. Monitoring engine configuration files have been rolled back to their last known good checkpoint.
Re: Lost services when upgrade failed
Posted: Tue Jun 17, 2014 10:56 am
by sreinhardt
Please apply config again, after the failure go to CCM->Monitoring Config Snapshots (on the left)->from the top red line, open the second icon from the left (should look like a piece of paper with a small corner folded). Paste the output from that file into the forum. Please remember to use
Code: Select all
wraps for large output or just attach instead of pasting.
Re: Lost services when upgrade failed
Posted: Tue Jun 17, 2014 11:04 am
by rickwilson7425
This is the list of config snapshots:
Date Snapshot Result File Actions
06/17/2014 08:00:01 Config Ok 1403013601.tar.gz Download View Output Restore Archive
06/16/2014 07:59:01 Config Ok 1402927141.tar.gz Download View Output Restore Archive
06/15/2014 07:58:01 Config Ok 1402840681.tar.gz Download View Output Restore Archive
06/14/2014 07:57:02 Config Ok 1402754222.tar.gz Download View Output Restore Archive
06/13/2014 07:56:02 Config Ok 1402667762.tar.gz Download View Output Restore Archive
06/12/2014 07:55:02 Config Ok 1402581302.tar.gz Download View Output Restore Archive
06/11/2014 07:54:01 Config Ok 1402494841.tar.gz Download View Output Restore Archive
05/28/2014 12:06:23 Config Error 1401300383.tar.gz Download View Output Delete
05/28/2014 12:04:45 Config Error 1401300285.tar.gz Download View Output Delete
05/28/2014 10:27:38 Config Ok 1401294458.tar.gz Download View Output Restore Archive
05/28/2014 10:27:08 Config Error 1401294428.tar.gz Download View Output Delete
05/28/2014 10:24:01 Config Ok 1401294241.tar.gz Download View Output Restore Archive
05/28/2014 10:23:10 Config Ok 1401294190.tar.gz Download View Output Restore Archive
05/23/2014 10:47:25 Config Error 1400863645.tar.gz Download View Output Delete
05/22/2014 10:04:45 Config Error 1400774685.tar.gz Download View Output Delete
05/22/2014 10:03:49 Config Error 1400774629.tar.gz Download View Output Delete
05/22/2014 09:57:46 Config Error 1400774266.tar.gz Download View Output Delete
05/22/2014 09:55:06 Config Error 1400774106.tar.gz Download View Output Delete
05/22/2014 09:54:01 Config Error 1400774041.tar.gz Download View Output Delete
05/22/2014 09:53:40 Config Error 1400774020.tar.gz Download View Output Delete
As you can see there isn't a failure file to open at the top of the list.
Here is what the config snapshot at the top of the list says:
Nagios Core 4.0.6
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 04-29-2014
License: GPL
Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Read object config files okay...
Running pre-flight check on configuration data...
Checking objects...
Checked 11 services.
Checked 10 hosts.
Checked 1 host groups.
Checked 0 service groups.
Checked 194 contacts.
Checked 34 contact groups.
Checked 176 commands.
Checked 9 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 10 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 9 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: Lost services when upgrade failed
Posted: Tue Jun 17, 2014 2:55 pm
by Box293
Can you please tell us what the Error is in this snapshot file or attach it please?
05/28/2014 12:06:23 Config Error 1401300383.tar.gz
Re: Lost services when upgrade failed
Posted: Tue Jun 17, 2014 2:59 pm
by rickwilson7425
I fixed the error that it indicates.
It says:
Nagios Core 4.0.5
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 04-11-2014
License: GPL
Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Error: Unexpected start of object definition in file '/usr/local/nagios/etc/commands.cfg' on line 339. Make sure you close preceding objects before starting a new one.
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.
Re: Lost services when upgrade failed
Posted: Tue Jun 17, 2014 3:39 pm
by Box293
rickwilson7425 wrote:I fixed the error that it indicates.
Did you resolve this or do you still need help?
If you need help, please attach the file '/usr/local/nagios/etc/commands.cfg'