This guide will suppose you already have the following:
The starting point of the migration guide is an architecture such as the following:
|
This guide covers the migration of Shinken configuration and data collected by Shinken. This includes:
Because each environment has its own characteristics, this guide does not cover the migration of elements other than the Shinken architecture and configuration, meaning:
The first step of the migration is to copy the Shinken data of each machine to its counterpart in the new platform.
For each machine in the current plateform with Synchronizer, Arbiter or Broker daemons:
Create a backup of all the data in the machine:
shinken-backup |
Create an archive of the created backup folder and copy it to the new machine
Extract the archive and restore the backup on the new machine:
shinken-restore /path/to/backup/folder |
If you do not want to migrate the all available Shinken Enterprise data, you can select what you want with the parameters of shinken-backup and shinken-restore commands. These options are described on the Backup and restore commands documentation page. This can be useful for example if you have network disks for metrics and you can simply mount them on the new machines instead of copying all the metrology data. |
Restoring the configuration copies the configuration from the old machine as is on the new machine. This means the addresses of the different daemons still point to the old daemons.
If the new platform is on another network with different addresses, you will have to change these addresses in the configuration to point to the new daemons addresses.
To keep hosts and checks status, Shinken uses retention on the Scheduler. When restarting a Scheduler, status are loaded from the retention instead of being "Unknown". This is important if you have notifications setup, because by default an "Unknown" status on an host or check sends a notification. With retention, restarting your Scheduler might send a notification for each host of your monitoring configuration.
When migrating, you might want to also copy your retention data. If the retention module on the Schedulers is PickeRetentionFile, you can migrate your retention data by copying the /var/lib/shinken/retention.dat on the associated Scheduler in the new infrastructure.
The shinken-backup utility does not backup the content of /var/lib/shinken/libexec/ and /var/lib/shinken-user/libexec/ yet. These folders contain scripts executed by Shinken to perform the checks. If you put custom scripts in any of these folders, you will have to manually copy their contents to the same folder on the new machines.
This operation only needs to be done on machines hosting Poller and Reactionners daemons.
The nagvis and nagvis-shinken-architecture addons added in the version V02.05.00 each have their own configuration files and content. The shinken-backup utility does not backup these configuration files and content yet.
To save and migrate those, you will have to copy the following files and folders on the new machines: