I was involved in a long conversation about how to best migrate in place from Sensu Classic to Sensu Go, as part of a migration strategy. Here’s the key take aways from the discussion.
Known In-place Migration Difficulties
- It’s possible to install the latest version of Sensu Classic (1.8 as of this post) side by side with Sensu Go (5.11 as of this post) without packaging conflicts. Previous versions of Sensu Classic may have packaging conflicts.
- sensu-plugins-ruby package conflicts with Sensu Classic (both provide sensu-install) . It’s safe to force the install, just make sure you know which sensu-install is on the system to avoid confusion as to which ruby environment it installs into.
- sensu-agent will fail to start while sensu-client is running if configured to offer sensu-client port (3030).
In-place Migration Strategy for Sensu Classic users
Note 1: Only attempt with Sensu Classic 1.8 or newer (if you are using Sensu Enterprise check with Sensu Enterprise support team for migration assitance)
Note 2: These steps have been tested on a CentOS 7 system, instruction details may need to be adapted for other target, but should work.
install sensu-go packages on target systems
sensu-go-backend and sensu-go-cli on the host running sensu-server
sensu-go-agent on the host running sensu-client
Adjust the sensu-agent configuration to disable the 3030 client socket
you’ll want to edit the
Leave this disabled until the migration is completed and the old sensu client is stopped.
Adjust the sensu-agent service to include the Sensu Classic ruby path and the new sensu-plugin-ruby path. Add file /etc/default/sensu-agent:
Adjust the sensu-backend service to include the Sensu Classic ruby path and the new sensu-plugin-ruby path. Add file /etc/default/sensu-backend:
Save list of installed plugins on target hosts.
/opt/sensu/embedded/bin/gem list --local --no-details --no-versions |grep sensu-plugins
start sensu-backend and sensu-agent services
live migrate Sensu resources as needed making use of the plugins installed in the classic environment.
When ready force install sensu-plugins-ruby package
Use sensu-install or /opt/sensu-plugins-ruby/embedded/bin/gem to install sensu-plugins into sensu-plugins-ruby environment.
remove sensu classic package when ready.