You are on page 1of 4

 Migration from EON 5.x to 5.

3

  Original message

 Now

 liberodark
o
 22 juil. 2020
 Amended

1 - In order to be able to migrate the configuration of the old servers on the new ones, the
configuration files of the old servers must be recovered.
To do this, you must use "backup-manager", which allows you to save the EON configuration
files in / etc / archives (these backups are done automatically every day at 4 am, by launching the
backup command -manager allows to force backups).

2 - Update of “postfix”
I position myself in “/ srv / save”, then I decompress the file “NOM_SERVEUR-
etc.xxx.master.tar.gz”
tar xvfz NOM_SERVEUR-etc.xxx.master.tar.gz
(Use the “gunzip” tool for the files. gz and “tar –xf” for the .tar files)
An “etc” directory is created, replace the “main.cf” file extracted from the backup with the
“main.cf” found in the “/ etc / postfix /” directory main.cf »
mv /srv/save/etc/postfix/main.cf /etc/postfix/main.cf
Then restart the postfix service
/etc/init.d/postfix reload
Or
service postfix restart

3 - Update of “Nagios”
Unzip the “NOM_SERVEUR-srv.xxx.master.tar.gz” directory, a “srv” directory is created.
Cut the nagios service then, in order to be able to recover the plugins of the old version:
cp –Rup /srv/save/srv/eyesofnetwork/nagios/plugins/*
/srv/eyesofnetwork/nagios/plugins/

Explanations:
• -R: Recursive mode. It will process the sub-folders present in the “plug-ins” directory
• -u: Update mode: Will add only the new files
• -p: preserve the rights

chmod -R a+x /srv/eyesofnetwork/nagios/plugins/*

If you had images that you want to keep:


cp –up /srv/save/srv/eyesofnetwork/nagios/share/images/logos/*
/srv/eyesofnetwork/nagios/share/images/logos/

Importing lilac sql database from old version of nagios into this new version:
bunzip2 NOM_SERVEUR-lilac.xxx.sql.bz2

Import the file into the "lilac" database:


mysql lilac –u root –-password=root66 < /srv/save/NOM_SERVEUR-lilac.xxx.sql

Chmod 777 on / srv / eyesofnetwork / lilac /


chmod 777 /srv/eyesofnetwork/lilac/

Then log in using your web browser to the web interface of "EON" (Identifiers default admin /
admin) and launch an export procedure in lilac: Administration> Apply Configuration
Now it request to update the database then click on "update installation" as many times as you
wish before doing a "restart"
Now, on the Nagios web interface, the hosts should be remounted.

4 - Check in the Administration / configuration / Nagios Daemon Configuration tab other


there is indeed the same information between the old and the new server

5 - Update of "Cacti"
To start, you must copy the image map files and / or icons of "cacti / weathermap":

cp –Rup /srv/save/srv/eyesofnetwork/cacti-0.8.7g/plugins/weathermap/images/
* /srv/eyesofnetwork/cacti/plugins/weathermap/images/
cp –Rup /srv/save/srv/eyesofnetwork/cacti-0.8.7g/plugins/weathermap/configs/
Nom_Cartes /srv/eyesofnetwork/cacti/plugins/weathermap/configs/

Currently there are no cards to import.


You must then copy the "rra" files from "cacti", these are the data files generated by cacti
according to your devices that you "grapher":
cp –Rup /srv/save/srv/eyesofnetwork/cacti-0.8.7g/rra/*
/srv/eyesofnetwork/cacti/rra/
Unzip the archive "NOM_SERVEUR-cacti.xxx.sql.bz2":
bunzip2 NOM_SERVEUR-cacti.xxx.sql.bz2
Then import the .sql file into the cacti database:
mysql cacti –u root –-password=root66 < /srv/save/NOM_SERVEUR-cacti.xxx.sql
Then put the appropriate rights (0777 group: eyesofnetwork, owner: cacti)
Check that everything is ok on the "cacti" web interface.
6 - weathermap: seems to have disappeared from the new version ????
launch https://IP_NOUVEAU_SERVEUR/cacti/plugins/weathermap/weathermap-cacti-
plugin-mgmt.php?action=addmap_pickerand click on ADD and integrate the cards from the
old server

7 - Update of "Nagvis"
Here are the different directories whose content you want to retrieve (on the old server):

/srv/eyesofnetwork/nagvis/etc/maps/*.*
/srv/eyesofnetwork/nagvis/share/userfiles/images/maps/*
/srv/eyesofnetwork/nagvis/share/userfiles/images/iconsets/*

Put the appropriate rights on all these directories. Check the rights on the original server and
reset the same.

8 - EONWEB
If you had to customize the left navigation menu of the EON interface, remember to modify the
menus.json file located under/srv/eyesofnetwork/eonweb/include/languages

9 - SNMP and MIBS Recopy


all the folder /usr/share/snmp/mibsfrom the old server to the new one
Copy the configuration files to /etc/snmp/*the new server

10 - GRAFANA
Since older versions of EON use pnp4nagios for graphs, and EON 5.3 uses grafana, follow the
steps below to use grafana:

 Export the hosts and services from the new server: Administration> Nagios
Configuration> Templates> List
o Select "ALL" on the right then in the Actions menu, choose Export, then
click on Submit
o Do the same for the "Services Template" section at the bottom of the page.
o We end up with two files: EoN_Export_ServiceTemplate.xml and
EoN_Export_HostTemplate.xml
o We now modify the graph commands to redirect them to grafana. Edit
these two files with any text editor, and replace the following data:
o EoN_Export_HostTemplate.xml: replace all
"/pnp4nagios/index.php/graph?host=$HOSTNAME$&srv= HOST " with
"/grafana/dashboard/script/histou.js?host=$HOSTNAME$". Also replace
all "/pnp4nagios/index.php/graph?
host=$HOSTNAME$&srv=$SERVICEDESC$" by
"/grafana/dashboard/script/histou.js?host=$HOSTNAME$&service=$
SERVICEDESC $ "
o EoN_Export_ServiceTemplate.xml: replace all
"/pnp4nagios/index.php/graph?
host=$HOSTNAME$&srv=$SERVICEDESC$" by
"/grafana/dashboard/script/histou.js?host=$HOSTNAME$& service = $
SERVICEDESC $ "
o Back up files
o Import the files back into the new EON server: Administration> Nagios
configuration> Tools (top right)> Import XML
o Select the files one by one and click on Sumbit. Leave "Keep Contacts",
"Keep Contactgroups" and "Keep Timeperiods" checked.
o Once re-imported, all your hosts will now be able to grap in Grafana
instead of pnp4nagios
o Then, go to / srv / eyesofnetworkconf / grafana then run the script
grafanaconf.sh
/srv/eyesofnetworkconf/grafana/grafanaconf.sh
o Reimport the SQL configuration from grafana:
mysql lilac -u root --password = root66 <grafana.sql

11 - If you use centreon plugins (centreon-plugins), create the following directory:


mkdir -p /var/lib/centreon/centplugins
Then set the appropriate rights
chown -R nagios:eyesofnetwork /var/lib/centreon/

12 - NRPE
errors Could not construct return packet in NRPE handler check client side (nsclient.log) on all
NRPE commands and in the nsclient.log logs on the host we see the following errors:
error: modules \ NRPEListener \ NRPEListener .cpp: 317: Exception handling NRPE packet:
Invalid packet version.
I solved this problem by adding to each command (in Administration / Configuration / Nagios
Commands) calling on check_nrpe the option "-2"
example:./chech_nrpe -H HOSTNAME -2

13 - Stop the old server and run the nmtui command on the new one to configure the
network cards like the old one

14 - Restart the server

Made by Romain Besland


Twitter: https://twitter.com/RomainBlnd

For more information feel free to go to: https://gitter.im/EyesOfNetworkCommunity/community

You might also like