Migrating in-place from Sensu Classic to Sensu Go

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.

  1. 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

  2. Adjust the sensu-agent configuration to disable the 3030 client socket
    you’ll want to edit the /etc/sensu/agent.yml file
    Leave this disabled until the migration is completed and the old sensu client is stopped.

  3. 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:

    PATH=/opt/sensu-plugins-ruby/embedded/bin:/opt/sensu/embedded/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin

  4. 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:

    PATH=/opt/sensu-plugins-ruby/embedded/bin:/opt/sensu/embedded/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin

  5. Save list of installed plugins on target hosts.

    /opt/sensu/embedded/bin/gem list --local --no-details --no-versions |grep sensu-plugins

  6. start sensu-backend and sensu-agent services

  7. live migrate Sensu resources as needed making use of the plugins installed in the classic environment.

  8. When ready force install sensu-plugins-ruby package

  9. Use sensu-install or /opt/sensu-plugins-ruby/embedded/bin/gem to install sensu-plugins into sensu-plugins-ruby environment.

  10. remove sensu classic package when ready.

1 Like

Hi jspaleta,

Do you have a Migration Strategy for Sensu Classic users running on docker (sensu classic v0.26) ?/

Thanks.

The situation really wouldn’t be much different except you’d want to copy the existing Sensu configs out of the production volume mount being used by the docker container, and into a workstation environment where you can run the translator gem as an aid to start the migration process.

1 Like