Node.js agent: Removing the monitoring plug-in
Before you uninstall the Node.js agent, you must remove the monitoring plug-in from your Node.js application.
Procedure
-
Remove data collector plug-ins from the beginning of the Node.js application file.
- If you upgrade the Node.js agent from Cloud
APM V8.1.3.2 to V8.1.4, complete the following procedure:
- If you enabled resource data collection, remove the following line from the beginning of the
Node.js application
file:
where KNJ_NPM_LIB_LOCATION is the directory to the lib folder of your npm package global installation directory. The default directory is /usr/local/lib.require('KNJ_NPM_LIB_LOCATION/node_modules/ibm-apm/knj_index.js'); - If you enabled resource data collection and deep-dive diagnostics data collection, remove the
following line from the beginning of the Node.js application
file:
require('KNJ_NPM_LIB_LOCATION/node_modules/ibm-apm/knj_deepdive.js'); - If you enabled resource data collection, deep-dive diagnostics data collection, and method
traces collection, remove the following line from the beginning of the Node.js application
file:
require('KNJ_NPM_LIB_LOCATION/node_modules/ibm-apm/knj_methodtrace.js');
- If you enabled resource data collection, remove the following line from the beginning of the
Node.js application
file:
- If you upgrade the Node.js agent from Cloud
APM V8.1.3 to V8.1.4, complete the following procedure:
- If you enabled resource data collection, remove the following line from the beginning of the
Node.js application file.
, where install_dir is the installation directory of Node.js agent.require('install_dir/lx8266/nj/bin/plugin/knj_index.js'); - If you enabled resource data collection and deep-dive diagnostics data collection, remove the
following line from the beginning of the Node.js application
file.
require('install_dir/lx8266/nj/bin/plugin/knj_deepdive.js'); - If you enabled resource data collection, deep-dive diagnostics data collection, and method
traces collection, remove the following line from the beginning of the Node.js application
file.
require('install_dir/lx8266/nj/bin/plugin/knj_methodtrace.js');
- If you enabled resource data collection, remove the following line from the beginning of the
Node.js application file.
- If you upgrade the Node.js agent from Cloud
APM V8.1.3.2 to V8.1.4, complete the following procedure:
-
Restart your Node.js application to disable the data collector plug-ins.
- If the version of your current Node.js agent is Cloud APM V8.1.3, till now the data collector plug-ins are successfully removed.
- If the version of your current Node.js agent is Cloud APM V8.1.3.2, continue to the following step.
-
Run the
./uninstall.shcommand from the install_dir/lx8266/nj/bin directory to remove your previous agent settings.
What to do next
For more information about uninstalling the Node.js agent, see Uninstalling your agents.