Uninstalling the Python data collector
To uninstall the Python data collector, roll back the changes that you have made to your application and then update the application deployment.
Procedure
-
Remove relative content from your Python application.
-
If your Python application is based on Django 1.10 or later versions, remove the following content from the MIDDLEWARE section in
setting.py
of your Django application:'ibm_python_dc.kpg_plugin.ResourceMiddleware',
-
If your Python application is based on Django 1.9 or older versions, remove the following content from the MIDDLEWARE_CLASS section in
setting.py
of your Django application:'ibm_python_dc.kpg_dc_django.ResourceMiddleware',
-
If your Python application is based on Flask, remove the Python data collector wsgi middleware content from the application file. For more information, see Monitoring on-premises Python applications running in individual Docker container.
-
-
If you deploy your application in individual Docker container or Kubernetes environments, remove all relative content from Dockerfile to not install python data collector and rebuild the Docker image.
- If you deploy your application on Kubernetes environments, remove all relative content from Python application yaml file.
-
If you deploy your application on bare-metal node or VMs, execute the following commands to remove installed Python data collector packages:
pip uninstall ibm-python-restclient pip uninstall ibm-python-dc
-
Restart your application.