Migrate Monarch to GroundWork 8

Migrate Install is considered a fresh GroundWork Monitor 8 installation plus a migration of your Monarch configuration from a previous version of GroundWork Monitor 7.x.

This page steps through the process for migrating Monarch to GroundWork Monitor 8. You will first need to refer to the New Install document to perform a new installation. After installation you can refer to the migration tasks on this page. 

The migration to GroundWork Monitor 8 is not quite exact, since the way we do self-monitoring in GroundWork Monitor changes significantly. Therefore you can expect that the "localhost" host in GroundWork Monitor 7.x configurations will vanish in GroundWork Monitor 8 after migration. If you have any particular custom services assigned to localhost that you wish to preserve, we suggest you move them to another host first. 

Also, you will see several added hosts in GroundWork Monitor 8 for the containers that run the system. Nagios™ ping checks of the containers will be automatically added after migration, and will show in the default Status Summary. These hosts and services are necessary, and any license will be increased to include them at no charge. They have names like "gw8-dockergw8_elasticsearch_1", and have several services from the Docker Cloud Hub connector as well. 

Known Issue

Monarch migration from GroundWork  7 to GroundWork 8 can require modification to some notification commands.

GroundWork 8 uses an updated /usr/bin/sendEmail which behaves slightly differently from previous versions, in that it requires a -t flag before the recipient address. This can cause the notification command to fail until the command definition is adjusted.

If the migrated command is:

/usr/bin/printf "%b" "some notification text in email body | /usr/bin/sendEmail -q -f $ADMINEMAIL$ -u "email subject" $CONTACTEMAIL$

The -t flag needs to be added, like this:

/usr/bin/printf "%b" "some notification text in email body | /usr/bin/sendEmail -q -f $ADMINEMAIL$ -u "email subject" -t $CONTACTEMAIL$

GroundWork Monitor 7.x

The following steps can be used to capture your existing GroundWork Monitor 7.x Nagios configuration database from your latest backup.

  1. Access the command line on your Groundwork 7.x server, for example via SSH. We assume you are using a user that is not root, but has sudo access. If you use root, then you can omit the sudo part. 

  2. Copy and paste the following command and run it:

    sudo tar -C /usr/local/groundwork/core/monarch/backup \
        -czf /tmp/$(ls /usr/local/groundwork/core/monarch/backup | tail -1).tar.gz \
        $(ls /usr/local/groundwork/core/monarch/backup | tail -1)
    • This will produce a file such as /tmp/2018-12-26_16-44-47.tar.gz. This is the backup to be transferred. Note the date portion of the filename as the timestamp for the next steps, e.g., "2018-12-26_16-44-47" in this example. 

GroundWork Monitor 8

  1. Transfer the backup you made above to the GroundWork 8 server. Place it in the gw8 directory. Use any secure method of transferring files you like, e.g., SCP. 
  2. From the command line on the GroundWork 8 server, change to the gw8 directory:

    cd gw8
  3. Substitute the appropriate timestamp from your captured filename and set it as the timestamp variable. For example (you will need to use your own timestamp):

  4. Copy and paste the following two commands to set the TAG variable and load the configuration:

    TAG=$(grep '^TAG=' .env | sed 's/^TAG=//')
    docker run --rm \
        -v ${PWD}/$timestamp.tar.gz:/$timestamp.tar.gz \
        -v dockergw8_monarch-backup:/usr/local/groundwork/monarch/backup \
        --name gw8 groundworkdevelopment/gw8:${TAG} \
        /src/docker_cmd.sh loadMonarchBackup $timestamp.tar.gz
  5. In GroundWork Monitor 8, go to Configuration > Nagios Monitoring > Control > Back up and restore and proceed to restore the GroundWork Monitor 7.x backup with the noted timestamp.

    You should disable notifications before committing the imported configuration. This will allow to identify any unforeseen problems without creating a notification storm. 

    Notifications are automatic in NoMa as well as Nagios. To disable notifications, for NoMa go to Configuration > Notifications and check each notification rule that is currently active (green checkmark) to be disabled (grey checkmark), and for Nagios go to Configuration > Nagios Monitoring > Control > Nagios main configuration > Notification and uncheck Enable notifications.

Related Resources