To disable data collection for Liberty applications in IBM Cloud Private, you must update the application deployment to add the IBM_APM_LIBERTY_DC_ENABLED environment variable and set its value to false.

Procedure

  • If the Liberty application is deployed using Microservice Builder, complete the following steps:
    1. Edit the chart/project_name/templates/deployment.yaml file to add the IBM_APM_LIBERTY_DC_ENABLED environment variable to the Liberty application Docker container specification:
          spec:
            containers:
            - env:
              - name: IBM_APM_LIBERTY_DC_ENABLED
                value: "false"
    2. Push the project update to the repository in the GitHub organization that the Microservice Builder pipeline is monitoring.
  • If the Liberty application is not deployed by using Microservice Builder, complete the following steps:
    1. Update the yaml file for the Liberty application to add the IBM_APM_LIBERTY_DC_ENABLED environment variables to the Liberty application container specifications:
          spec:
            containers:
            - env:
              - name: IBM_APM_LIBERTY_DC_ENABLED
                value: "false"
    2. Update the Liberty deployment by replacing the previous yaml file.
      kubectl replace -f updated_liberty_app_deployment.yaml
      Tip: Kubernetes rolling update is recommended because it can update an application with minimum application downtime. For more information, refer to the Kubernetes documentation.

Results

The Liberty application is updated with the data collector disabled.

Join The Discussion

Your email address will not be published. Required fields are marked *