Disable Elasticsearch in CJE


Disable Elasticsearch in CJEv1



To disable Elasticsearch in CJEv1, you must be running at least CJE 1.11.7.

There are a few steps to be done to correctly disable ES in CJEv1:

Step 1 - Disable Elasticsearch, Topbeat, and Logstash services

With version 1.11.7 (and later) of CJEv1, you can permanently disable the Analytics stack composed of Elasticsearch, Topbeat, and Logstash.

Prepare the elasticsearch-disable operation

cje prepare elasticsearch-disable

Edit the elasticsearch-disable.config and set disable to yes

disable = yes

apply the operation

cje apply

When this operation is applied, it will permanently disable Elasticsearch, Topbeat, and Logstash. New controllers/workers will not have these services anymore. The services are also stopped on the current workers/controllers.

Step 2 - Disable CloudBees Jenkins Analytics (If Enabled)

Execute the following script on the Operations Center through Manage Jenkins -> Script Console to disable the Analytics related plugins:

def jenkins = Jenkins.getInstance();
def plugins = jenkins.getPluginManager().getPlugins().each{ plugin ->
    if (plugin.isEnabled()) {
    	if (plugin.getShortName().startsWith("operations-center-analytics") ||
            plugin.getShortName() == "pse-config-info" ||
            plugin.getShortName() == "pse-analytics-dashboards"
           ) {
          println "Operations Center Analytics v1 detected, incompatible with CJM, disabling " + plugin.getShortName()

IMPORTANT You must not uninstall the CloudBees Jenkins Analytics plugins. Uninstall the plugins instead of disabling them could produce the instance not to be able to start again.

After running this script, a restart of Operations Center is required.

You will also need to run the same script on all the existing Managed Masters connected to the Operations Center. You can do this either one by one or via a Cluster Operation on the Operations Center.

Finally, anytime you create a new Managed Master, you will need to run this script to disable the Analytics plugins.

Step 3 - Delete the dedicated Elasticsearch workers

Check to see if there are any dedicated Elasticsearch workers created using cje run list-workers. If there are, remove them, one by one, through the cje prepare worker-remove operation.

Note: if you are running CJE Anywhere, it’s also needed to stop the mesos-slave service in those workers. Please follow the steps described in Recycling CJE 1 Anywhere servers to do it.

Health checks steps

Connect to all workers and controllers with dna connect controller-x or dna connect worker-X and check that:

  • There is not a topbeat process running by executing ps -ef | grep topbeat
  • Confirm the logstash docker container is not running by executing sudo docker ps
  • Confirm there is not a Manage Jenkins -> Configure Analytics section on your Operations Center and all your Managed Masters


  • Is it safe to disable Analytics/Elasticsearch and what will be its impact (impact in terms of agent provisioning, Managed Master provisioning, installing plugins, or changes to existing configurations) ?

The process of disabling Analytics/Elasticsearch should not have any impact in the cluster, except the fact that you will need to restart Operations Center and all Managed Masters to correctly disable the Analytics plugins.

  • If we disable Elasticsearch, what’s the process of re-enabling it ?

At this point, there are two possibilities.

  1. You can re-enable Elasticsearch 1.7 that is bundled with the product. The advantage is that deployments are managed by CJE. In the case you would like to re-enable Elasticsearch again, have a look at the article Re-Enable Elasticsearch in CJE.
  2. You can use Elasticsearch Reporter, in which you can use Elasticsearch 5.x/6.x. The disadvantage is that you need to manage the Elasticsearch cluster yourself.

Have more questions?


Please sign in to leave a comment.