Jenkins Health Advisor by CloudBees

Jenkins Health Advisor by CloudBees (formerly known as "CloudBees Jenkins Advisor") proactively notifies you of problems with your Jenkins-based environment. Jenkins Health Advisor by CloudBees identifies numerous issues before they affect your users, including security vulnerabilities, performance problems, and plugin version issues. Best of all, Jenkins Health Advisor by CloudBees is constantly being improved by the CloudBees Support and Engineering teams to cover the most recent identified issues.

By default, you’ll receive a summary email whenever a new problem is identified in your Jenkins instance. You can configure the email address Jenkins Health Advisor by CloudBees uses in the Configuration section.

Initially, Jenkins Health Advisor by CloudBees sends an initial report that lists everything it detects in your system. Subsequent reports will only report changes from the initial report. It’s important to note that Jenkins Health Advisor by CloudBees only emails you if it finds something wrong: if it doesn’t find any problem in your system, it won’t send you email.

Jenkins Health Advisor by CloudBees identifies problems by scanning a Support Bundle from your Jenkins master. The Support Bundle is generated on a daily basis and submitted to servers hosted by CloudBees by the Jenkins Health Advisor plugin. For instructions on defining the types and kinds of data to include in the Support Bundle, see the Optional Configuration section.

Installation Requirements

The requirements for installing and using Jenkins Health Advisor by CloudBees are:

  • A Jenkins LTS instance of version 2.138.4 or newer.

  • CloudBees Jenkins Instances must be on version 2.138.4.3 or newer to install the Jenkins Health Advisor by CloudBees.

    • If you are using an older version than those listed and you are a CloudBees Subscriber, you can use the Assisted Update process by submitting a ticket to CloudBees Support. For more information, see the Required Data: Assisted Update article.

  • A Support Bundles generated from your Master must be less than 500MB to successfully send the report.

  • An Internet connection is required for the Advisor plugin to send Support Bundles from your Master. For more information, see the Network Configuration section.

Install Process

Jenkins Health Advisor by CloudBees should be installed on all Masters in your instance.

To install Jenkins Health Advisor by CloudBees on many masters in a CloudBees Core or Operations Center environment, see Installing on Masters in an Operations Center cluster for instructions.
Jenkins Health Advisor by CloudBees is installed by default in CloudBees Jenkins Distribution instances. If you are using a CloudBees Jenkins Distribution instance you can directly configure the plugin.
  1. Access the plugin manager for your Masters, Manage Jenkins > Manage plugins and select the Available tab.

    1. Direct Link: {JENKINS_URL}/pluginManager/available

  2. Search for the plugin named Health Advisor by CloudBees.

  3. Select the checkbox to the left under the Install column and click on the button Download now and install after restart.

  4. After the plugin has been installed, restart your Jenkins instance.

If you are using Jenkins (and not a CloudBees product) and the support-core plugin is not yet deployed on your instance, it is mandatory to restart the master after its installation to not have your logs flooded by errors messages (known issue: JENKINS-59696).

Configuration

To configure your system to use Jenkins Health Advisor by CloudBees:

  1. Select Manage Jenkins Health Advisor by CloudBees from the Manage Jenkins screen.

    global config
  2. Accept the Terms and Conditions.

  3. Add a valid email to the email field.

  4. You may optionally click on send a test email to verify that your Jenkins instance can reach the server and send you back an email.

    configure
  5. Save your configuration.

After the plugin is properly configured, your Jenkins instance will be connected to the Advisor service.

You will begin receiving reports to your defined email.

You should receive your first report within the next 24 hours when using defaults.
You will have to designate at least one email address to receive emails from the Advisor service. This email service will need to accept email coming from advisor-support@cloudbees.com. Please check your email filters.
advisor report

Optional configuration

You can configure what information is sent to the server from the Analyzed Data section of the configuration page. Click on the button Configure Data and select the data you want to be sent and analyzed. The options are the same as the Support Core plugin.

configure optional

If your system is configured so that you cannot access the server from your instance, you can disable the message from the Reminder section.

Select the box to Suppress the reminder to configure Jenkins Health Advisor by CloudBees.

Configuration as Code Support

Version 3.0 of Jenkins Health Advisor by CloudBees includes support for Jenkins Configuration as Code. Here is a configuration sample:

advisor:
  acceptToS: true
  email: "jdoe@example.com"
  ccs:
    - "list1@example.com"
    - "list2@example.com"
  excludedComponents:
    - "ItemsContent"
    - "GCLogs"
    - "Agents"
    - "AgentsConfigFile"
    - "ConfigFileComponent"
    - "RootCAs"
    - "SlaveLogs"
    - "OtherConfigFilesComponent"
    - "HeapUsageHistogram"
  nagDisabled: false

Network Configuration

The servers infrastructure used for Jenkins Health Advisor by CloudBees is hosted on Amazon Web Services (us-east-1 region). The Jenkins instance must be able to connect to the server at insights.cloudbees.com on port 443 (https). Refer to AWS IP address ranges if a more specific IP address range definition is required.

Addendum

Installing on Masters in an Operations Center cluster

To install, configure and update Jenkins Health Advisor by CloudBees on multiple CloudBees Jenkins Masters managed by a CloudBees Operations Center, you can use a Cluster Operation.

To create and configure a cluster operation:

  1. In Target managed masters, add the masters upon which you want to install or configure Jenkins Health Advisor by CloudBees. Make sure you’ve taken care of the prerequisites!

  2. Add the following steps:

    1. An Install plugin step with the plugin ID set to cloudbees-jenkins-advisor and no version: using no version instructs the system to use the most recent plugin available for the given master.

    2. An Execute Groovy Script on Master step using the following script (replacing the test@email.com email with your preferred email address):

      1. If you deploy a version of the plugin >= 3.0:

        import com.cloudbees.jenkins.plugins.advisor.*
        import com.cloudbees.jenkins.plugins.advisor.client.model.*
        
        println "Configuration of Advisor ..."
        
        def config = AdvisorGlobalConfiguration.instance
        
        config.acceptToS = true
        config.email = "test@email.com"
        config.ccs = [new Recipient("list1@acme.com"),new Recipient("list2@acme.com")] // optional
        config.nagDisabled = true // optional
        
        config.save()
        println "Configuration of Advisor done."
      2. If you deploy a version of the plugin < 3.0:

        import com.cloudbees.jenkins.plugins.advisor.*
        
        println "Configuration of Advisor ..."
        
        def config = AdvisorGlobalConfiguration.instance
        
        config.acceptToS = true
        config.isValid = true
        config.email = "jdoe@acme.com"
        config.cc = "list1@acme.com,list2@acme.com" // optional
        config.nagDisabled = true // optional
        
        config.save()
        println "Configuration of Advisor done."
  3. After running this script, restart your CloudBees Jenkins masters.

Your masters are now configured to use Advisor. You will receive the first report within 24 hours.

Copyright © 2010-2019 CloudBees, Inc.Online version published by CloudBees, Inc. under the Creative Commons Attribution-ShareAlike 4.0 license.CloudBees and CloudBees DevOptics are registered trademarks and CloudBees Core, CloudBees CodeShip, CloudBees Jenkins Enterprise, CloudBees Jenkins Platform, CloudBees Jenkins Operations Center and DEV@cloud are trademarks of CloudBees, Inc. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Jenkins is a registered trademark of the non-profit Software in the Public Interest organization. Used with permission. See here for more info about the Jenkins project. The registered trademark Jenkins® is used pursuant to a sublicense from the Jenkins project and Software in the Public Interest, Inc. Read more at www.cloudbees.com/jenkins/about. Apache, Apache Ant, Apache Maven, Ant and Maven are trademarks of The Apache Software Foundation. Used with permission. No endorsement by The Apache Software Foundation is implied by the use of these marks.Other names may be trademarks of their respective owners. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this content, and CloudBees was aware of a trademark claim, the designations have been printed in caps or initial caps. While every precaution has been taken in the preparation of this content, the publisher and authors assume no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein.