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 the version 1.11.7 (and later) of CloudBees Jenkins Enterprise, you can permanently disable the Elasticsearch Reporter 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

Those changes 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 - Uninstall CloudBees Jenkins Analytics (If Installed)

Execute in CloudBees Jenkins Operations Center to disable CloudBees Jenkins Analytics

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()

After this, a restart of Operations Center is needed.

This action will disable all the Analytics plugins in Operations Center and they should be disabling the Elasticsearch reporter on all the Managed Masters connected with Operations Center.

Step 3 - Delete the dedicated Elasticsearch workers

Check if there are dedicated elasticsearch workers created with ‘cje run list-workers’ and remove them, one by one, through the operation cje prepare worker-remove.

Health checks steps

  • Connect to any worker or controller in the worker with dna connect controller-x or dna connect worker-X and check that:
  • There is not any topbeat process after running ps -ef | grep topbeat
  • Logstash docker container is not running sudo docker ps
  • Check on any of the Managed Masters that under Manage Jenkins -> Configure Analytics the reporting is disabled


  • Is it safe to disable Analytics/Elasticsearch or what will be its impact(impact in terms of agent provisioning, jenkins instance provisioning , installing plugins , existing configuration) ?

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 to correctly disable the Analytics plugins. Meanwhile Operations Center is restarting features related like Docker Agents Provisioning will stop working - although current builds will continue working.

  • If we disable it, whats the process of re-enabling it ?

At this point there are two possibilities. You can use Elasticsearch 1.7 bundled with the product - with the advantage that deployments are managed by CJE, or you can use Elasticsearch Reporter, in which you can use version 5.x or 6.x, but with the disadvantage on this case you need to manage the Elasticsearch cluster yourself.

In case you would like to re-enable the Elasticsearch again, have a look at the article Re-Enable Elasticsearch in CJE.

Have more questions? Submit a request


Please sign in to leave a comment.