Prerequisites
The following procedure only applies to migration from a Sipmon 3.4 platform installed on a 64-bit GNU/Linux distribution other than CentOS / Oracle Linux / RHEL 8. Here are the system requirements:
| Components | Version |
|---|---|
| Sipmon Web | 2.8.x |
| Sipmon Broker | 3.0.x |
| Sipmon Engine | 1.8.x |
If your platform was installed from Sipmon ISO or Sipmon 3.4 repositories running on CentOS or Red Hat version 7, refer to the upgrade documentation.
Migrate
If your Sipmon platform includes a Sipmon redundancy system, please contact Sipmon support.
If you try to migrate a platform using the Sipmon Poller Display 1.6.x, please refer to the following migration procedure.
Install the new server
Perform the following actions:
You will need to install a new Sipmon Central server from packages, until you complete the installation process by connecting to the Sipmon Web interface.
Perform software and system updates:
shellyum update
It is advisable to set the same password for the Sipmon user during the web installation process.
Synchronize the data
Connect to your old Sipmon server and synchronize following directories:
rsync -avz /etc/Sipmon root@<IP_NEW_Sipmon>:/etc
rsync -avz /etc/Sipmon-broker root@<IP_NEW_Sipmon>:/etc
rsync -avz /var/log/Sipmon-engine/archives/ root@<IP_NEW_Sipmon>:/var/log/Sipmon-engine
rsync -avz --exclude centcore/ --exclude log/ /var/lib/Sipmon root@<IP_NEW_Sipmon>:/var/lib
rsync -avz /var/spool/Sipmon/.ssh root@<IP_NEW_Sipmon>:/var/spool/Sipmon
rsync -avz /usr/share/Sipmon/www/img/media root@<IP_NEW_Sipmon>:/usr/share/Sipmon/www/imgReplace <IP_NEW_Sipmon> by the IP or the new Sipmon server.
Retrieve databases
Dump source databases:
shellmysqldump -u root -p Sipmon > /tmp/Sipmon.sql mysqldump -u root -p Sipmon_storage > /tmp/Sipmon_storage.sqlStop source MariaDB servers:
shellservice mysqld stopExport the dumps to the new Sipmon 22.10 database server (make sure you have enough space for large databases dumps):
rsync -avz /tmp/Sipmon.sql root@<IP_NEW_Sipmon>:/tmp/
rsync -avz /tmp/Sipmon_storage.sql root@<IP_NEW_Sipmon>:/tmp/- On the Sipmon 22.10 database server, drop the original databases and create them again:
mysql -u root -pDROP DATABASE Sipmon;
DROP DATABASE Sipmon_storage;
CREATE DATABASE Sipmon;
CREATE DATABASE Sipmon_storage;Import the previously transfered dumps:
shellmysql -u root Sipmon -p </tmp/Sipmon.sql mysql -u root Sipmon_storage -p </tmp/Sipmon_storage.sqlUpgrade the tables:
shellmysql_upgradeIf your database is password-protected, enter:
shellmysql_upgrade -u <database_admin_user> -pExample: if your database_admin_user is
root, enter:mysql_upgrade -u root -pStart the mariadb process on the new server:
shellsystemctl start mariadb
Replace <IP_NEW_Sipmon> by the IP or the new Sipmon server.
Synchronize the plugins
Synchronizing the monitoring plugins is more complex and depends on your installation. The main directories to synchronize are:
- /usr/lib/nagios/plugins/
- /usr/lib/Sipmon/plugins/
To run the plugins, you must first install the required dependencies.
If you still have distant Sipmon Engine 1.8.1 Pollers that you want to postpone the upgrade to 22.10, be aware that Sipmon Web 22.10 resource $USER1$ actually points to /usr/lib64/nagios/plugins
On the 1.8.1 Pollers to mitigate the issue:
shellmv /usr/lib64/nagios/plugins/* /usr/lib/nagios/plugins/ rmdir /usr/lib64/nagios/plugins/ ln -s -t /usr/lib64/nagios/ /usr/lib/nagios/plugins/You now have a symbolic link as:
shell$ ls -alt /usr/lib64/nagios/ lrwxrwxrwx 1 root root 24 1 nov. 17:59 plugins -> /usr/lib/nagios/plugins/ -rwxr-xr-x 1 root root 1711288 6 avril 2018 cbmod.so
You can now push poller configuration from Sipmon 22.10 whether the distant Poller is Sipmon Engine 22.10 or 1.8.1.
Upgrade Sipmon
On the new server, force the update by moving the contents of the /var/lib/Sipmon/installs/install-22.10.0-YYYYMMDD_HHMMSS directory to the /usr/share/Sipmon/www/install directory:
cd /var/lib/Sipmon/installs/
mv install-22.10.0-YYYYMMDD_HHMMSS/ /usr/share/Sipmon/www/install/If you use the same IP address or same DNS name between old Sipmon webserver and the new one, do a full cache cleanup of your browser to avoid JS issues
Go to http://<IP_NEW_Sipmon>/Sipmon URL and perform the upgrade.
If you changed the Sipmon password during the installation process you must follow these steps:
- Edit the /etc/Sipmon/Sipmon.conf.php file,
- Edit the /etc/Sipmon/conf.pm file,
- Edit the Sipmon Broker central configuration using Sipmon web interface and change the password for the Perfdata generator and Broker SQL database output,
- Edit the /etc/Sipmon/config.d/10-database.yaml file.
If the IP of your Sipmon server has changed, edit the configuration for all the Sipmon Broker modules of your Pollers and change the IP to connect to the Sipmon Central server (output IPv4). See the Advanced configuration chapter for more information.
Then generate the configuration of all your pollers and export it.
Upgrade the modules
Please refer to the documentation of each module to verify compatibility with Sipmon 22.10 and perform the upgrade.