Kaplan, Andrew H. wrote: > Hello -- hi,
welcome to the community :) > I am planning on migrating from Nagios 3.3.1 to Icinga 1.7, and I have > a procedure in mind to accomplish > this task. The steps involved are the following: in order to accomplish this, it would be valuable to know, how the old nagios setup is installed. tarball, special configure flags (cat config.log) or packages. this only for the reason to have an inventory and idea which things are important to be moved (the location!). > 1. Build another system from scratch, and restore from backup the > Nagios directory with the result being > two systems that are identical in their Nagios configurations. > 2. Run the migration procedure, taken from the Icinga website, on the > second system to convert it from a > Nagios to an Icinga installation. > 3. Take the original Nagios system offline, and have the new system > conduct the system monitoring. bit more into detail, as the docs are basic, not knowing everything possible in your system (@Wolfgang you might add that though, my words are not copyrighted nor trademarked). 1. do an inventory on the existing nagios host - collect where configs are grouped, how they are edited (by vim, by tool generation, by config gui?) - see which addons are installed (pnp, check_multi, etc) - see which additional to nagios-plugins plugins are installed - get an idea where the nagios log is stored - get an idea where the retained data (retentention.dat) ist stored (and objects.precache if used) - get to know your gui - if it's classic ui, see cgi.cfg - get to know the paths where things are living now, and then 2. compare nagios to icinga - install a fresh icinga on the new host, best will be from your preferred package manager (debs are on the run, rpms will be there, gentoo ebuilds are available). source will work as well, your choice. - if you want to use the new icinga web later on (or reporting), idoutils is required. so make sure to install that as well (e.g. quickstart idoutils on the docs) - decide wether to tell configure to "look like a nagios", this means prefixes, command pipe, paths, users, etc (optional - if too much hassle, leave it default) - transfer all configs to the new host and do a diff -ur nagios.cfg icinga.cfg (as well as cgi.cfg) - note and document all new features icinga will have in the config, and which you will be planning to use (if applicable) - note and document all your old nagios.cfg settings different to the ones icinga provides. analyse the change, ask the community in case, read the performance hints guides on wiki.icinga.org in the howtos space - note the different locations of files. a default /usr/local/icinga prefix will keep everything in there, except initscript and apache config. 3. freeze - freeze configs - make sure to always get latest logs and retention.dat 4. step by step migration before you actually feed icinga with old data plus your config, make sure to prepare the follwing - stop icinga on the new host - copy all logs plus archives to their location (keep in mind that icinga cgis can read nagios-* as well) - copy retention.dat (and objects.precache if any) to the location icinga.cfg expects it - adjust icinga.cfg with your old customizations plus newer ones, adapt different paths (e.g. use /usr/local/icinga/etc/myveryownobjectdir as cfg_dir include, which won't be touched by src upgrades...) - copy your object configuration in place - paths: make sure everything is alright - !do not start icinga yet! - install nagiosplugins and verify the plugins dir path in resource.cfg - $USER1$ plus your command definitions! - next - /etc/init.d/icinga show-errors (same as verifyconfig but with output on the shell if errors and icinga.chk saved for future reference) - handle the errors and play a bit with the setup - get to know the icinga classic ui once you are done with the basic setup, do the final migration 5. final migration - stop the nagios core to write retention.dat (or restart it), copy this to the icinga host where icinga is stopped - also copy the logs so far from the productive host - start icinga - in case you already chose to load idomod.so, make sure to have ido2db started before 6. migration to idoutils if you happen to have an old ndoutils database, the migration is a bit complicated. config and statusdata are live, so only in historical regards this could be interesting - but in that case, more information from your side is required. old states from the logs cannot be imported into the database - there's information lacking to do so. 7. icinga web and other addons (reporting) remember - this can be installed optional. the hint before about installing idoutils will already give you a rdbms backend to work with. the classic ui will be the first gui you will see to testdrive your new installation, and also as fallback if you chose to migrate to the new web. - get the docs and wiki guides and install accordingly - mark the special requirements such as icinga.cmd access and databases.xml with db credentials 8. addons & plugins some addons will have /nagios/cgi-bin/status.cgi etc hardcoded. or the apache config is wrong too. this needs to be adapted then as well. on the wiki you will see some of the guides. if you happen to have plugins to be compiled, do it, but do not copy binary plugins from the old host to the new one. furthermore, if you are migrating rrds make sure to stay on the same architecture - see some rrdtool migration methods. especially for embedded perl - nagios +-epn is still supported. if you require the environment macros (which are disabled by default in icinga.cfg) to have NAGIOS_ prefix, there's a special configure flag now. otherwise, your plugins should get to know about this. plugins will run as icinga user by default - so temporary locations require that permissions in case. > What are everyone's thoughts on this? the above is detailed if you care about previous history. if not, do it like you proposed yourself. either way, migrating to icinga is a good idea :) kind regards, michael -- DI (FH) Michael Friedrich Vienna University Computer Center Universitaetsstrasse 7 A-1010 Vienna, Austria email: michael.friedr...@univie.ac.at phone: +43 1 4277 14359 mobile: +43 664 60277 14359 fax: +43 1 4277 14338 web: http://www.univie.ac.at/zid http://www.aco.net Lead Icinga Core Developer http://www.icinga.org ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ icinga-users mailing list icinga-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/icinga-users