Before you upgrade the Node.js agent,
you must remove the monitoring plug-ins from your Node.js application.
About this task
Based on your Node.js agent version, you need to complete different procedure to remove the monitoring
plug-ins from your Node.js application. To find out the agent version, see Agent Version Command.
Procedure
-
Remove data collector plug-ins from the beginning of the Node.js application file.
- If you upgrade the Node.js agent from V01.00.12.00 to V01.00.13.00, complete the following procedure:
- If you enabled resource 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_index.js');
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.
- 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 upgrade the Node.js agent from V01.00.10.00 to V01.00.13.00, complete the following procedure:
- If you enabled resource data collection, remove the following line from the beginning of the
Node.js application file.
require('install_dir/lx8266/nj/bin/plugin/knj_index.js');
,
where install_dir is the installation directory of
Node.js agent.
- 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');
-
Restart your Node.js application to disable the data collector plug-ins.
- If the version of your current Node.js agent is V01.00.10.00,
till now the data collector plug-ins are successfully removed.
- If the version of your current Node.js agent is V01.00.12.00,
continue to the following step.
-
Run the
./uninstall.sh
command from the
install_dir/lx8266/nj/bin directory to remove your previous
agent settings.
What to do next
Upgrade the Node.js agent. See Upgrading your agents.