Reporting, Analysis and Analytics

Subject: Zenoss 4.2.5 auto deploy script feedback

1.  Zenoss 4.2.5 auto deploy script feedback

Posted 14 days ago
https://github.com/jcurry/Zenoss_4.2.5_core-autodeploy/tree/master

I tried using the script on a minimal CentOS 6.9 VM.

I had to install wget and remove the mysql-libs that was already installed.

And I guess you renamed the script to "core-autodeploy.sh" instead of whatever you have on the GitHub page.

The script ran fine until I ran into this error.

Complete!
Installing optimal /etc/my.cnf settings
Configuring MySQL
Starting MySQL.. SUCCESS!
Enabling rpmforge repo...
--2017-12-01 09:06:44-- http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
Resolving apt.sw.be... failed: Name or service not known.
wget: unable to resolve host address "apt.sw.be"
Command failure: wget http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm

------------------------------
Clay
Network Computer Technician
------------------------------


2.  RE: Zenoss 4.2.5 auto deploy script feedback

Posted 11 days ago
Hi Clay,
The install script shouldn't be using the rpmforge repo.  Could I suggest you follow the instructions in the README to run the yum commands to remove pre-req software, making sure you also do the "yum clean all".  I sometimes find that the zenossdeps-4.2.x-1.el6.noarch doesn't get removed by this - not sure why - but you can shift it with:
rpm -e zenossdeps-4.2.x-1.el6.noarch

I have just run this through again on my CentOS 6.3 build and it worked fine.  It may be that you have that rpmforge.repo enabled for something else and it is getting invoked anyway?  I found a google hit here - https://github.com/repoforge/rpms/issues/378  that might be helpful.

Since I was checking things, I have also updated the CentOS autodeploy script (in the git master branch), to install the latest SUP732, rather than the earlier SUP671.  That also ran clean.

Cheers,
Jane

------------------------------
Jane Curry
Skills 1st United Kingdom
jane.curry@skills-1st.co.uk
------------------------------



3.  RE: Zenoss 4.2.5 auto deploy script feedback

Posted 11 days ago
Thanks Jane.

I went through and did all the "yum remove" commands.  Then I edited the script to go to "http://ftp.tu-chemnitz.de/pub/linux/dag/redhat/el6/en/x86_64/rpmforge/RPMS/" to get the rpmforge package.

And hey, it works!

Do you have a magic script for moving my data?

------------------------------
Clayton
Network Computer Technician
------------------------------



4.  RE: Zenoss 4.2.5 auto deploy script feedback

Posted 10 days ago
Magic is in the eye of the beholder ;)

Depends on where you are starting from (Zenoss version) and what you really want to move.

Earlier releases of Zenoss 4.x you may simply be able to run a full zenbackup on the earlier version and then zenrestore on the new build.  Depending on your exact versions, watch for the --mibs and --libexec flags which backup the mibs directory and the $ZENHOME/libexec directory - you want these if you have a late enough zenbackup to support them.  The other trick you need to ensure is that you have installed the same ZenPacks on your old and new systems - don't think they have to be identical versions but they must be there.

Other than that, I have done a number of these migration jobbies, even going back as far as Zenoss 2.x.  zenbatchdump / zenbatchload is your friend to move your Zope database - with the possibility to prune stuff you don't want any more.

If you have customised templates, scripts, events, mibs then I would create a migration ZenPack.

Depending on how old you "old" is, you may or may not get your events or  performance data moved.  If you are starting with Zenoss 3 then I think you have to give up on your existing events as the database architecture changed completely with 4.  I have a feeling that you can't migrate performance data if you are going from a 32-bit Zenoss to a 64-bit.

Cheers,
Jane

------------------------------
Jane Curry
Skills 1st United Kingdom
jane.curry@skills-1st.co.uk
------------------------------



5.  RE: Zenoss 4.2.5 auto deploy script feedback

Posted 10 days ago
In my case, all I want to do is get my list of devices, with all their attributes, from the v4.2.5 that I created with the OVA (CentOS 5, not patched) to the v4.2.5 I created from your script (CentOS 6, patched to 732).

The only ZenPacks that the old server has that the new server doesn't are:

ZenPacks.community.Brocade
ZenPacks.community.ConstructionKit
ZenPacks.community.deviceAdvDetail
ZenPacks.vaibhav.brocadeswitches

I know why I have the two Brocade ZenPacks but the other two I don't recognize.  Are you familiar with them?

------------------------------
Clayton
Network Computer Technician
------------------------------



6.  RE: Zenoss 4.2.5 auto deploy script feedback

Posted 9 days ago
ZenPacks.community.ConstructionKit is a community development kit from Joseph Anderson, long before Zenoss produced their zenpacklib / SDK.  He then built some of his ZenPacks on top of that Construction Kit so it may be a pre-req to one of your brocade ZenPacks.

ZenPacks.community.deviceAdvDetail in some ways is similar but even earlier, built by "Big Egor", an amazing early contributor to the Zenoss community.  Again, it was a prereq for some of his ZenPacks and I think other developers also built on top of it.

Either way, if you are planning to go with zenbackup / zenrestore, I still think you will need the SAME ZenPacks on old and new, even if they are not being used.  If you can confirm that ZenPacks are not needed in your old environment then, having taken a full system backup, I would try and remove them, check things are clean, and then start on the zenbackup process.

If you are going from 4.2.5 to 4.2.5 then you shouldn't run into any version incompatibilities.  I think you will find that the --mibs --libexec flags do exist on your old Zenoss.

Cheers,
Jane

------------------------------
Jane Curry
Skills 1st United Kingdom
jane.curry@skills-1st.co.uk
------------------------------



7.  RE: Zenoss 4.2.5 auto deploy script feedback

Posted 9 days ago
Should I be using zenbackup/zenrestore or zenbatchdump/zenbatchload?

And how would I be able to confirm that a particular zenpack wasn't needed in my old environment?


------------------------------
Clay
Network Computer Technician
------------------------------



8.  RE: Zenoss 4.2.5 auto deploy script feedback

Posted 9 days ago
FYI: I had to create a "Blade Switches" under Devices before the ZenPacks.vaibhav.brocadeswitches would install.

And it looks like ZenPacks.community.ConstructionKit and ZenPacks.community.deviceAdvDetail are dependencies for ZenPacks.community.Brocade which I don't think I need anymore.



------------------------------
Clayton
Network Computer Technician
------------------------------



9.  RE: Zenoss 4.2.5 auto deploy script feedback

Posted 8 days ago
If you really dont need the Brocade ZenPack then it would make sense to remove it and those 2 pre-reqs, before moving forward.  Personally, I would be VERY sure that I had a VMware snapshot (if your Zenoss server is a VM) or an operating system backup, before doing this.  Sounds like you have already seen some odd things around your new build with those ZenPacks :(   Actually, if you got them installed in the new environment, back that up and test removal on the new system first.  I just have a feeling that I have struggled removing stuff built on the ConstructionKit ZenPack in the past - that is why I am suggesting you have a very safe plan B.

Cheers,
Jane

------------------------------
Jane Curry
Skills 1st United Kingdom
jane.curry@skills-1st.co.uk
------------------------------



10.  RE: Zenoss 4.2.5 auto deploy script feedback

Posted 8 days ago
Thanks.  I took a snapshot and removed 3 of the 4 ZenPacks and everything seems to be working.  I still have all 611 of my devices and I can drill down into at least some of their details.

Should I be using zenbackup/zenrestore or zenbatchdump/zenbatchload for moving my data from my old server to my new one?

------------------------------
Clayton
Network Computer Technician
------------------------------



11.  RE: Zenoss 4.2.5 auto deploy script feedback

Posted 7 days ago
I would try zenbackup / zenrestore.  That will get all of your zodb database (all devices, components, event definitions, mibs,, templates, reports,...).  You can use the --no-eventsdb if you dont want to backup your events.  You can use --no-perfdata if you dont want to backup your performance data.  zenbackup also backs up several of the Zenoss directories with configuration data - it really is a backup of your entire Zenoss.

Zenbatchdump / zenbatchload will ONLY bring devices across - not templates, not event definitions......  It's the next option if zenbackup/zenrestore won't work (like if you are going from very different versions of Zenoss or you are going from, say, an Ubuntu platform to CentOS.

Cheers,
Jane

------------------------------
Jane Curry
Skills 1st United Kingdom
jane.curry@skills-1st.co.uk
------------------------------



12.  RE: Zenoss 4.2.5 auto deploy script feedback

Posted 7 days ago
I'm mostly interested with getting the devices with all their data and not so much their historical data so I went with the --noeventsdb and the --noperfdata but I'm getting what looks like a mysql password error when I try to restore.

Restoring ZODB database.
WARNING:zenbackupbase:ERROR 1045 (28000): Access denied for user 'zenoss'@'localhost' (using password: YES)

ERROR 1045 (28000): Access denied for user 'zenoss'@'localhost' (using password: YES)

gzip: stdout: Broken pipe
Done Restoring ZODB database.

Any suggestions?

------------------------------
Clayton
Network Computer Technician
------------------------------



13.  RE: Zenoss 4.2.5 auto deploy script feedback

Posted 6 days ago
Do you have the --save-mysql-access flag on the zenbackup  on your old Zenoss?  If so, do another backup using that.
Cheers,
Jane

------------------------------
Jane Curry
Skills 1st United Kingdom
jane.curry@skills-1st.co.uk
------------------------------