You can configure the Node.js data collector to monitor the on-premises Node.js applications running on stand-alone Docker containers, VMs, or
physical nodes (xLinux only). The Node.js data collector sends monitoring data to the Cloud App
Management
server.
About this task
Configure the Node.js data collector using the
apply_configpack.sh file that you extract from
nodejs_datacollector_2019.4.0.tgz, and ibm-cloud-apm-dc-configpack.tar file that you download from
the server.
Procedure
- To configure the Node.js data collector for
VMs or physical nodes, run the following command to apply server configuration to the monitored
application:
./apply_configpack.sh path_configpack [application folder]
Where application folder is the directory where you run node
<yourapp.js>, default value is current folder.
- To configure the Node.js data collector for
stand-alone Docker environment, do the following steps:
- Go to the directory where you extract the configuration package in Obtaining the server configuration information, and run the following command:
./apply_configpack.sh path_configpack [application folder]
Where application folder is the directory where you run node
<yourapp.js>, default value is current folder.
- Update the Docker file of your Node.js application by adding the following line to get
the write access to the work directory:
RUN chmod 777 nodejs_dir
Where nodejs_dir is the home directory of your Node.js application, for
example, /var/apps/acmeair-nodejs.
- Rebuild your docker container with Node.js dc (ibmapm) and configpack
installed.
docker build -t <application image name>:<image tag>