Use this procedure to migrate a Ubuntu 12.04 ServiceNav Box to a ServiceNav Box 4.0 and higher.
The principle is as follows:
- create a new ServiceNav Box following the usual procedure,
- from the new ServiceNav Box, run a migration script that copies the data from the old ServiceNav Box including its network configuration, shuts down the old ServiceNav Box and restarts the new ServiceNav Box
Creation of the new ServiceNav Box
Retrieve the master of the ServiceNav Box in the right format, on the site ftp://software.servicenav.io (contact support to get credentials)
Import the master in the virtualization environment.
Configure the network for this ServiceNav Box.
Detailed steps hereto step 2.3.2.
Preparing the old ServiceNav Box
The copy of the data is done from the new ServiceNav Box under SSH on the TCP/22 port. This port must therefore be open on the old ServiceNav Box, which must be the case if both ServiceNav Boxes are on the same LAN.
To test that the TCP/22 port is open on the old ServiceNav Box, run the following command on the new ServiceNav Box: telnet
In the opposite case, modify the /etc/init.d/iptables.sh file on the old ServiceNav Box and reload this file.
Connect with an SSH client on the new ServiceNav Box.
Run the following command while logged in with the user root :
-p --halt-remote --reboot
Online help for the command
/usr/local/nagios/bin/import-ConfigurationFromBox.sh -host [host] -u [user] -p [password] [options]
-host Remote box hostname (required).
-port Remote box port (default: 22).
-timeout Connect timeout in seconds (default: 10)
-u, -user Username used to connect to remote box (default: root).
-p, -password Password used to connect to remote box (required).
-o, -output Filepath to log file (default: importConfigurationFromBox.log).
-halt-remote Halt remote box upon operation success (default: false).
-reboot Reboot this host upon operation success (default: false).
Reconnect to the new SNB and restart remoteOperationBox : service remoteOperationBox restart.
Restarting Nagios : nagios restart service
Reload the configuration of the supervision for SNB from the ServiceNav website.
Test the correct NTP configuration : ntpq -np
Switch back to the mailbox configuration : dpkg-reconfigure exim4-config
Test the sending of an email: echo " mail from snb " | mail -s " mail from snb " email@example.com
If the old ServiceNav Box was used as a collector for ServiceNav agent lifts, the opposite port, closed by default, should be opened:
- Edit the file /etc/init.d/iptables.sh
- Uncomment the line: iptables -A INPUT -p tcp -dport $PORT_NSCA -j ACCEPT
- Execute: /etc/init.d/iptables.sh
If inventory counts were taking place on the old ServiceNav Box, check the configuration of the new ServiceNav Box by running this procedure : https://coservit.com/servicenav/fr/documentation/configurer-fonction-inventaire/
Restart the snmp service: snmpd restart service
Verify that the supervision data is correctly uploaded to the ServiceNav website.