Uninstalling the Node.js data collector
To uninstall the Node.js data collector, roll back the changes that you have made to your application and then update the application deployment.
Procedure
-
If the Node.js application in IBM® Cloud
Private
is deployed by using Microclimate, complete the
following steps:
-
Complete one of the following steps:
- To uninstall the Node.js data collector that was
set up without internet access, edit the main file of your Node.js application to remove the
following line:
require('./ibmapm'); - To uninstall the Node.js data collector that was
set up with internet access, edit the main file of your Node.js application to remove the following
line:
require('appmetrics');
- To uninstall the Node.js data collector that was
set up without internet access, edit the main file of your Node.js application to remove the
following line:
- Push your project to a new repository that the Microclimate pipeline is monitoring.
-
Complete one of the following steps:
-
If the Node.js application is not deployed by using Microclimate, complete the following steps:
-
Complete one of the following steps:
- To uninstall the Node.js data collector that was
set up without internet access, edit the main file of your Node.js application to remove the
following line:
require('./ibmapm'); - To uninstall the Node.js data collector that was
set up with internet access, edit the main file of your Node.js application to remove the following
line:
require('appmetrics');
- To uninstall the Node.js data collector that was
set up without internet access, edit the main file of your Node.js application to remove the
following line:
- Remove configpack reference.
- For Kubenetes environment, remove the secret reference and the corresponding mount volume in the
application yaml
file:
volumeMounts: - mountPath: /opt/ibm/apm/serverconfig name: serverconfigvolumes: - name: global-environment secret: secretName: icam-server-secret optional: true - For local on-premise or docker container environment, run the following
command:
rm -f global.environment rm -f keyfile.p12
- For Kubenetes environment, remove the secret reference and the corresponding mount volume in the
application yaml
file:
- Remove all Node.js data collector resources from the application.
- To uninstall the Node.js data collector that was
set up without internet access, edit the main file of your Node.js application to remove the
following line:
rm -rf ibmapm - To uninstall the Node.js data collector that was
set up with internet access, edit the main file of your Node.js application to remove the following
dependencies line in package.json of your
application:
"appmetrics": "^5.0.0"
- To uninstall the Node.js data collector that was
set up without internet access, edit the main file of your Node.js application to remove the
following line:
- Apply the changes to make the uninstalling take effect.
- In local on-premise environment, delete
node_modulesfolder from the home directory of your application, and then run the npm install command to install the application dependencies. - In Docker container environment (whether Kubernetes or not), you need to rebuild your docker image.
- In local on-premise environment, delete
-
Complete one of the following steps: