EV Observe - Migrate a Box

Last modified on 2022/08/11 19:16

Caution: You should always perform a snapshot of your virtual Box prior to a migration. The EasyVista Support team will not resolve any issues related to the migration and its impact on your platform.

You migrate a Box in order to:

  • Update the operating system by installing the latest Ubuntu version supported by EV Observe.
  • Replace a defective but still accessible Box (unstable or behaving unexpectedly) and migrate it to a new Box.
     

You can perform the migration:

  • Minimum Box version: 4.17 In the Web app. In this case, no machine is required. You can simply select the Box eligible for migration and run the processing.
      Open url.png See the procedure
  • To a Box deployed using the Ubuntu 20.04 LTS master. In this case, the migration of the OS is performed by deploying a new Box and by copying the network configuration and data from the existing Box.
       Open url.png See the procedure
     

Type of migration to choose
The version upgrade to Ubuntu 20.04 LTS requires two to four hours of total unavailability. During this downtime, there will be no notifications and no raw data will be collected. If you want to avoid this unavailability period and the absence of data, you should perform the migration using a Box deployed using the Ubuntu 20.04 LTS master.

Notes

  • Software version upgrades are automatically performed by the EV Observe platform.
  • Prior to running the migration, there must be 5 GB available disk space on the Box to be updated.

Caution

  • If you want to change the Box, you must ensure that the password of the new Box does not contain the $ symbol as this will prevent the migration script from running correctly.
  • When generating the password for a Hyper-V Box, you must not use punctuation marks. This is because punctuation marks are not always correctly interpreted by the Hyper-V console and access will not be possible if there is no network connection.

Best Practice

  • If the Box has a specific configuration or context, this may generate an error and block the version upgrade. For this reason, you should schedule the migration to run during the usual business hours so that you can contact the EasyVista Support team if there is an issue.
  • Run the migration progressively on a few of the Box at a time.
  • Perform snapshots on the most critical virtual Box so that you can rollback the version if there is an issue.
  • Report maintenance on the Box to be migrated for the duration of the update. The recommended value is four hours. This avoids triggering false positives and alerts that are time-consuming to handle.
  • Access to the Box is secured using a password.
    • At the end of the migration, you should replace the default password.
    • Use a password generator and create a strong password that includes 12 characters, upper and lower cases, numbers, punctuation marks and unique characters.

Procedures

How to perform the migration using the EV Observe interface

From: EV Observe platform version 4.17 onwards

Prerequisites

  • The Box must be able to access the Internet and specifically the Ubuntu repository to retrieve the installation sources.
  • If required, you should expand the disk space of the Linux partition. The minimum disk space required is 5 GB. Open url.png See the detailed procedure
  • The protocols below must be authorized for external access. Note: The list may change over time depending on the updated repositories called during installation.
    • ping protocol ==> echo (7)
    • http protocol ==> 80
    • https protocol ==> 443
    • ftp protocol ==> 21
       

Step 1: Select the Box to be updated

1. Display the list of Box by selecting Configuration > General > Box in the menu.

Best Practice icon.png  To display all of the Box for your sites or customer sites, select the Site and subsites option in the company and site tree structure.
        Migration from application - Select all companies and sites boxes.png

2. Select the Boxes to be updated.

Note: Only Boxes whose status is Update available can be selected.
 

Step 2: Run the update of the eligible Box

1. Click Start the update.

  • The update of the eligible Boxes you selected will start.
    • The Update sent status indicates that the update request has been sent to Box.
    • The Update in progress status indicates that the Box is being updated. This status may last from two to four hours. During this time, the Box will not be operational.
  • Once migration is completed, the status of all Boxes where the processing was successfully run will be Version up to date. The new version will be Ubuntu 20.04 LTS.

2. Correct the errors for Boxes where the migration processing failed and run the migration again.

Note: When the remoteOperationBox service is restarted (scheduled to run nightly), this will reinitialize the error statuses and make the Box eligible for migration once again. As long as you have not corrected the errors for the relevant Boxes, there is no point in running their migration again.

Box whose status is Non-compliant prerequisites

  • Disk space error: Expand the disk space of the Linux partition for the Box to 5 GB minimum. See the detailed procedure
  • Ubuntu repository access error: Check that the Boxes are able to access the Internet to retrieve the installation sources. If required, you should configure the proxy to define the VPN link with the platform. Open url.png See the detailed procedure
     

Box whose status is Update failed
Caution: You must correct this error quickly because this means that the Box may be unstable and as such, non-operational.

  • Restore a snapshot and correct the errors. Run the migration again.
  • You can contact the EasyVista Support team if you need help in restoring the snapshot and rerunning the migration.
     

Step 3: Reconfigure the Box that collects SNMP traps 

   Open url.png See the detailed procedure

How to migrate to a Box deployed using the Ubuntu 20.04 LTS master

Step 1: Prepare the existing Box

1. Open the SSH port for the existing Box if it is used to collect data from agents.

  • Run the command below to check the port status.
    Replace {IP_old_box} with the IP address of the existing Box and {SSH_port} with the SSH port of the existing Box.

telnet {IP_old_box} {SSH_port}

  • If the SSH port is closed:
    • Open the file called /etc/init.d/iptables.sh in the existing Box.
    • Enable the row, iptables -A INPUT -p tcp –dport $PORT_NSCA -j ACCEPT.
    • Run the following command, /etc/init.d/iptables.sh.

2. Run the command below to stop Nagios services for the existing Box.

service nagios stop

Step 2: Create the new Box using the Ubuntu 20.04 LTS master

1. Import the Ubuntu 20.04 LTS master to the virtual environment from the sFTP site (sftp://software.servicenav.io).

Note: Contact the EasyVista Support team to obtain the relevant login information.

2. Configure the network of the new Box.

   Open url.png See the detailed procedure
 

Step 3: Copy the network configuration and data from the existing Box to the new one

1. Log in to the new Box as the root user using an SSH client.

2. Run the command below to restart the new Box.

Replace {IP_old_box} with the IP address of the existing Box and {password_old_box} with the password of the existing Box.

/usr/local/nagios/bin/importConfigurationFromBox.sh --host {IP_old_box} -u coadmin -p {password_old_box} --halt-remote --reboot

  • –host: Remote box hostname (required)
  • –port: Remote box port
  • –timeout: Connect timeout in seconds (default: 10)
  • -u, –user: Username used to connect to remote box (default: coadmin)
  • -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)

3. Run the commands below to restart the remoteOperationBox and Nagios services for the new Box.

service remoteOperationBox restart
service nagios restart

4. Run the command below to reload the monitoring configuration for the new Box.

ntpq -np

5. Configure the sending of notification emails using the Exim4 service found on the new Box. Next, run the commands below to check that emails are sent correctly.

dpkg-reconfigure exim4-config
echo "mail from snb" | mail -s "mail from snb" first_name.name@mail.com

6. Run the command below to restart the SNMP service for the new Box.

service snmpd restart

  • The new Box will be deployed in the Web app.
  • Monitored data will be reported from the existing Box to the Web app.

Note: If the error message below appears, this indicates that the migration script was unable to run because the Box has multiple network interfaces.

[ERROR] Migrating network configuration : multiple network interface found : {interface_name}

In this case, you must specify the network interface to be configured.

  • Open the Netplan configuration file called /etc/netplan/90-snb.yaml/ with root access rights.
  • Replace the value of the Interface_name property with {interface_name} which is the name of the interface to be configured, as specified in the error message.
  • Save your modifications.
  • Run the following command, netplan apply with root access rights to apply the modifications you made to the configuration.
     

Step 4: Migrate the new Box to version 4.17 in the Web app

1. Select Configuration > General > Box in the menu.

2. Select the new Box.

3. Click Start the update.
 

Step 5: Secure access to the new Box using a password

Note: For security reasons, the migration script is unable to modify the password.

1. Run the command below once you have logged in using the coadmin user.

passwd

2. Follow the instructions to modify the password of the coadmin account.

Tags:
Powered by XWiki © EasyVista 2022