TECHZEN Zenoss User Community ARCHIVE  

4.2.5 to 6.2.3?

Subject: 4.2.5 to 6.2.3?
Author: Alex Timler
Posted: 2021-05-26 08:21

Hello guys,

Is there a way to move all network objects from 4.2.5 to 6.2.3?

I was able to export all object from 4.2.5 with zenbatchdump, but I don't see a way to import it to 6.2.3

Thank you!

------------------------------
Alex Timler
------------------------------


Subject: RE: 4.2.5 to 6.2.3?
Author: Michael Rogers
Posted: 2021-05-26 17:20

Alex,

There's a zenbatchload command that you can run from the CLI, but it has to be done from inside a Docker container.  This makes the process a bit trickier than running it straight from a 4.2.5 host.  The process will look something like this.

1. We'll assume that your zenbatchdump output text file is named output.txt
2. Create a /tmp/loaderfiles/ directory on your Control Center (CC) master and copy the file (in whatever manner you're comfortable with) to it.
3. SSH to your CC master.
4. CD to the /tmp/loaderfiles/ directory.
5. Run the following:

serviced service shell zope     # spawns a new container based on the Zope service definition. 
                                # This provides the required connectivity to other services.


su - zenoss                     #just as in Zenoss 4.x, Zenoss commands must be run as the zenoss user

cd /mnt/pwd                     #containers spawned by serviced service shell will mount the working directory at the time of command execution
                                #(in this case, /tmp/loaderfiles/) as /mnt/pwd

zenbatchload output.txt         #there are a few options you may want to take advantage of, listed below

exit                            #quits the zenoss user

exit                            #exits the zope shell


​​​​​​​Now, for those zenbatchload options:

--nocommit:  This will test your config file for errors.  Changes are not committed to the database.
--nomodel: This will add in all of the devices/classes/organizers specified in your file but will skip modeling.  I usually prefer this method as it allows the process to run faster and doesn't clog up the terminal with a million lines of modeler output.  Devices will eventually be modeled when zenmodeler performs its next periodic remodel of your environment.

If you use neither of those, zenbatchload will add in each device one at a time, and will model each before proceeding to the next.  If you opt for this method (or if you do a --nomodel and just have a lot of devices​), start the process in a screen or tmux session.  Depending on numerous factors (number of devices, model/nomodel, network/disk latency, etc.) the batchload could take anywhere from minutes to hours.

Also, a word of warning for you (and/or any future users of zenbatchload):  zenbatchload is a good worker, but a real dummy.  He'll do exactly what you tell him.  Made a typo in your handcrafted batchload file and typed /Server/SSH/Liuxn instead of /Server/SSH/Linux?  Well, guess where your devices are going?  That's right; exactly where you told it.

If you're using a file generated by zenbatchdump, you should have no issues with spelling or syntax.  It might still be worth scanning the file with the old Mk.1 Eyeball just to make sure you actually want everything that's about to be loaded.

I hope this helps, but if you have questions or run into any issues, let us know?

------------------------------
Michael J. Rogers
Senior Instructor - Zenoss
Austin TX
------------------------------


Subject: RE: 4.2.5 to 6.2.3?
Author: Alex Timler
Posted: 2021-05-27 14:38

Hi Michael,

Thanks for detailed explanation. Looks like I don't have zenbatchload on new Zenoss. I'm getting the error: bash: zenbatchload: command not found

Should I download and install it? 
In general, the exported file from Zenoss 4 supposed to work on Zenoss 6?

Thanks,
Alex

------------------------------
Alex Timler
------------------------------


Subject: RE: 4.2.5 to 6.2.3?
Author: Michael Rogers
Posted: 2021-05-27 19:20

Alex,

Can you provide your terminal log starting from logging in to the point when you get the "command not found" message?  If you're correctly logged into a container, the command should be available.

Exported class/device lists from Zenoss 4.x should work in Zenoss 5 and 6.  It's also worth mentioning that you should check your installed ZenPacks on your original system and compare them to the target.  Going from older to newer versions shouldn't be a problem, but if the target system is missing a ZenPack, you may have issues.

------------------------------
Michael J. Rogers
Senior Instructor - Zenoss
Austin TX
------------------------------


Subject: RE: 4.2.5 to 6.2.3?
Author: Alex Timler
Posted: 2021-05-31 10:48

Hi Michael,

I was able to import it, but all the object names were broken, it was kind of gibberish...
Probably I will add all the objects manually. Thank for your help!

Alex

------------------------------
Alex Timler
------------------------------


< Previous
WinRM on Win10
  Next
Zenoss CE - High Availability Deployment
>