export downtime from 3.5.1 to 4.1.1

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
nagmoto
Posts: 195
Joined: Fri Jan 09, 2015 8:05 am

export downtime from 3.5.1 to 4.1.1

Post by nagmoto »

Hi
For a Nagios 4 server upgrade poject,
I need to export many host/services downtime in Nagios 3.5.1 into Nagios 4.1.1
Can you provide some guidance on how to do this ?
So far, retentsion.dat rsync between two nodes looks like doing the job on downtime setting carry over.
ie, What status/info can't be copied over by rysnc files ?

PS: This is a active(3.5.1)/active-muted(4.1.1) dual servers setup. 2nd server has alerting disabled. 2nd server

Thanks
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: export downtime from 3.5.1 to 4.1.1

Post by ssax »

Are you using ndo2db/ndomod/ndoutils as well (data stored in the DB)? As long as you're not using NDO then it's all flat files and rsync should work.

I can't really recommend just rsyncing the files (not the host/service configs) from 3.5.1 to 4.1.1 though, there have been a lot of changes since 3.5.1 and you will likely run into some issues.

That being said, you should be able to rsync all the host/service configs over and as long as they verify properly it should work.

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
nagmoto
Posts: 195
Joined: Fri Jan 09, 2015 8:05 am

Re: export downtime from 3.5.1 to 4.1.1

Post by nagmoto »

Thanks for the reply ssax

>Are you using ndo2db/ndomod/ndoutils as well (data stored in the DB)?

no ndoutils enabled on Nagios 3.5.1. but on dest Nagios 4.1.1, ndoutil is enabled to send info to MariaDB.

>As long as you're not using NDO then it's all flat files and rsync should work.

For my understanding, ndo is an add-on. It convert info in flat files like retention.dat , objects/*.cfg servers/*.cfg into mysql tables.
the direct rsync of retention.dat file from 3.5.1 to 4.1.1 server so far is ok. I am able to see all the downtime/host/server active check disabling got carry over.
Are you saying if ndoutil is enable on 4.1.1, I shouldn't have a retention.dat file ?

>I can't really recommend just rsyncing the files (not the host/service configs) from 3.5.1 to 4.1.1 though, there have been a lot of changes since 3.5.1 and you will likely run into some issues.

Yes. there are some marco definitions no longer applicable for 4.1.1, but I was able/luky to remove those variables from 3.5.1/etc/nagios/objects/*.cfg before rsync over to 4.1.1.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: export downtime from 3.5.1 to 4.1.1

Post by tgriep »

Having NDOUTILS enabled on your system, doesn't take anything away from Nagios Core, you should still have the retention.dat file.
All Ndoutils does is store the information from Nagios in to MYSQL so third party tools can access the data using MYSQL.
Does that answer your question?
Be sure to check out our Knowledgebase for helpful articles and solutions!
nagmoto
Posts: 195
Joined: Fri Jan 09, 2015 8:05 am

Re: export downtime from 3.5.1 to 4.1.1

Post by nagmoto »

>Does that answer your question?
Yes. this is my understanding also. Please resolve this ticket.
Locked