Upgrade XI 2012R1.7

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Upgrade XI 2012R1.7

Post by lmiltchev »

Here's how a service dependency configuration should look like:

Code: Select all

define servicedependency{
	dependent_host_name	host_name
	dependent_hostgroup_name	hostgroup_name
	servicegroup_name	servicegroup_name
	dependent_servicegroup_name	servicegroup_name
	dependent_service_description	service_description
	host_name	host_name
	hostgroup_name	hostgroup_name
	service_description	service_description
	inherits_parent	[0/1]
	execution_failure_criteria	[o,w,u,c,p,n]
	notification_failure_criteria	[o,w,u,c,p,n]
	dependency_period	timeperiod_name
   	}
The "dependent_host_name" and the "host_name" directives are required. For more information, see this:

https://assets.nagios.com/downloads/nag ... dependency

The easiest way to deal with this would be to make your host/service dependencies "inactive" under the CCM, so that you will be able the finish the upgrade. You can always revisit the dependencies, and fix the config errors (after the upgrade).

It is not unusual to see some errors with host/service dependencies during an upgrade. The issue is described on our FAQ wiki page:

https://support.nagios.com/wiki/index.p ... 14_Upgrade
Be sure to check out our Knowledgebase for helpful articles and solutions!
sutenag
Posts: 59
Joined: Thu Dec 10, 2015 6:39 am
Location: Stockholm, Sweden

Re: Upgrade XI 2012R1.7

Post by sutenag »

I have deactivate these 2 services defined in the cfg file below,
dependent_service_description The Daily Ignore check
service_description Testing_eventhandlers

and still get this error

Can i in some way make the upgrade skip this file check and go on with the upgrade?

I have also tried to add host_name and tried with different host, error then its that it cant find the host

Error: Impossible service dependency definition
(config file '/usr/local/nagios/etc/servicedependencies.cfg', starting at line '14')
Error processing object config files!
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Upgrade XI 2012R1.7

Post by lmiltchev »

I recommended deactivating the service dependencies, NOT the services...
The easiest way to deal with this would be to make your host/service dependencies "inactive" under the CCM...
Go to CCM->Advanced->Service Dependencies, and click on the "Yes" active button to deactivate the dependency.
example01.PNG
You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
sutenag
Posts: 59
Joined: Thu Dec 10, 2015 6:39 am
Location: Stockholm, Sweden

Re: Upgrade XI 2012R1.7

Post by sutenag »

Deactive the way you show in the screen, still same error

Error: Impossible service dependency definition
(config file '/usr/local/nagios/etc/servicedependencies.cfg', starting at line '14')
Error processing object config files!
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Upgrade XI 2012R1.7

Post by lmiltchev »

Did you apply configuration after you deactivated the service dependency? Do you see any errors, when you run the Write Config Tool?

CCM->Tools->Write Config Files->Write->Verify
Be sure to check out our Knowledgebase for helpful articles and solutions!
sutenag
Posts: 59
Joined: Thu Dec 10, 2015 6:39 am
Location: Stockholm, Sweden

Re: Upgrade XI 2012R1.7

Post by sutenag »

When i have done that earlier, nagios remove all my changes in the cfg files there i have add host name ( see history) example the SNMP.cfg file i had a lot of error in the begining trying to upgrade. after i add some host name it was solved. If do write to file and verify all my added data is removed :(
sutenag
Posts: 59
Joined: Thu Dec 10, 2015 6:39 am
Location: Stockholm, Sweden

Re: Upgrade XI 2012R1.7

Post by sutenag »

Now suddenly the upgrade process come much longer, i did an write to file and verify then the servicedependencies.cfg file was empty and i have to add the host to my cfg file again,

BUT it have upgrade to 5.2.3 and all servcies is OK and all up and running !??

On Verify system i get
Error: Could not find any host matching 'SLSV64' (config file '/usr/local/nagios/etc/services/SLSV64.cfg', starting on line 46)
Error: Failed to expand host list 'SLSV64' for service 'Ping' (/usr/local/nagios/etc/services/SLSV64.cfg:46)






WRITE CONFIGS SUCCESSFUL!
OUTPUT:
Nagios Core 4.1.1
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-19-2015
License: GPL

Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Error: Could not find any host matching 'SLSV64' (config file '/usr/local/nagios/etc/services/SLSV64.cfg', starting on line 61)
Error: Failed to expand host list 'SLSV64' for service 'Total Processes' (/usr/local/nagios/etc/services/SLSV64.cfg:61)
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.
RET: 1
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/module.so' - /usr/lib64/php/modules/module.so: cannot open shared object file: No such file or directory in Unknown on line 0
/usr/local/nagiosxi/nom/checkpoints/nagioscore/errors /usr/local/nagiosxi/scripts
tar: Removing leading `/' from member names
/usr/local/nagiosxi/scripts
LATEST NOM SNAPSHOT: /usr/local/nagiosxi/nom/checkpoints/nagioscore/1455036183.tar.gz
/ /usr/local/nagiosxi/scripts
RESTORING NOM SNAPSHOT : /usr/local/nagiosxi/nom/checkpoints/nagioscore/1455036183.tar.gz


The system is upgraded , but it is alote of after work to get the verify to passed. I get errors in services.cfg files like

Error: Could not find any host matching 'SLRKXBOI' (config file '/usr/local/nagios/etc/services/SLRKXBOI.cfg', starting on line 14)
Error: Failed to expand host list 'SLRKXBOI' for service 'SL Test BOI' (/usr/local/nagios/etc/services/SLRKXBOI.cfg:14)


Should i run an new ./upgrade and see what it says or stay in this version and handle all errors one by one until verify passed?
Last edited by sutenag on Tue Feb 09, 2016 2:09 pm, edited 1 time in total.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Upgrade XI 2012R1.7

Post by lmiltchev »

You have a different errors now:
Error: Could not find any host matching 'SLSV64' (config file '/usr/local/nagios/etc/services/SLSV64.cfg', starting on line 61)
Error: Failed to expand host list 'SLSV64' for service 'Total Processes' (/usr/local/nagios/etc/services/SLSV64.cfg:61)
Do you have a host, named 'SLSV64'? Is it "active'? Can you show us the '/usr/local/nagios/etc/services/SLSV64.cfg'?

You will need to go back to the CCM, fix the error, and re-run the "Write" and "Verify" process from the "Write Config Files" tool.
Resolve any further errors in the CCM, repeating the process above as many times as necessary until all config errors are resolved. Then, apply configuration.
Be sure to check out our Knowledgebase for helpful articles and solutions!
sutenag
Posts: 59
Joined: Thu Dec 10, 2015 6:39 am
Location: Stockholm, Sweden

Re: Upgrade XI 2012R1.7

Post by sutenag »

Yes i have an host SLSV64 and it was inactive when this error occurred. But after i activate the host the error was gone and new errors comes up. SO i have to fix every new error in ccm with verify until its passed then apply config.

Latest error with verify is

Error: Could not find any host matching 'SLRKXOFS' (config file '/usr/local/nagios/etc/services/ORA-SLRKXOFS.cfg', starting on line 380)
Error: Failed to expand host list 'SLRKXOFS' for service 'ORA-SLRKXOFS tnsping' (/usr/local/nagios/etc/services/ORA-SLRKXOFS.cfg:380)

I have now done this upgrade on a test server with same Nagios version and centos and have notice that it have been alote of erros and troubleshooting during the upgrade, have take almost 2 days with your support. Now its time to do same upgrade on our production server. So the question is now will it be as hard upgrade with alote of errors and troubleshooting, our biggest concern is whether it will be down and servicedesk will be blinde during the upgrade? I have seen under this upgrade that Nagios was up even if the errors come up, will nagios works and alerts will be sends anyway?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Upgrade XI 2012R1.7

Post by lmiltchev »

A typical upgrade shouldn't take more than 15-20 min. It definitely shouldn't take 2 days.

Upgrading 2012R1.7 to the latest is a big jump. Nagios Core 4 has more rigorous error checking than Core 3. Some of the configs that were "valid" in Core 3 will fail in Core 4. You will need to check for errors via the Write Config Tool, and fix them in the CCM, before continuing with the upgrade as described here:

https://support.nagios.com/wiki/index.p ... 14_Upgrade

Note: If you really get stuck with the upgrade, you can open a new support ticket in our email ticketing system, and we can do a remote session if needed.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked