Customizing the Node.js data collector for on-premises applications
By modifying files in the data collector package, you can set the environment variables to customize the monitoring for your Node.js application.
You can set the variables by customizing the environment variables or editing the config.properties file. You can find the config.properties file in the ibmapm/etc folder where your Node.js data collector is installed.
Variable name | Importance | Value | Description |
---|---|---|---|
KNJ_SAMPLING | Optional | Sampling count of requests | The number of requests based on which a sample is taken. The default value is
If you do not
set this variable, the default value |
KNJ_MIN_CLOCK_TRACE | Optional | Response time threshold for collecting method trace, in milliseconds | If the response time of a request instance exceeds the value of this variable, the data
collector collects its method trace. The default value is If you do not
set this variable, the default value |
KNJ_MIN_CLOCK_STACK | Optional | Response time threshold for collecting stack trace, in milliseconds | If the response time of a request instance exceeds the value of this variable, the data
collector collects its stack trace. The default value is If you do not
set this variable, the default value |
KNJ_ENABLE_METHODTRACE | Optional |
|
Enables or disables method trace.
If you do not set this variable, the default value |
KNJ_ENABLE_DEEPDIVE | Optional |
|
If you set this variable to true, then the diagnostic data is sent to the server. By default, this value is set to false, which means that diagnostic data is not sent to the server. |
KNJ_ENABLE_TT | Optional |
|
Enables or disables the transaction tracking of AAR.
By default, this value is not set, which means transaction tracking is disabled. |
KNJ_AAR_BATCH_FREQ | Optional | Interval at which AAR data is sent, in seconds | Specifies the interval at which the AAR data is batched and sent to the server, in
seconds. The default value is 60, which means the AAR data is batched and sent to the server every minute. Note: This variable works with KNJ_AAR_BATCH_COUNT to determine when AAR data is batched and sent to the
server. When the condition that is set by either of the two variables is met, AAR data is batched
and sent. When the requests that the AAR data contains reaches the maximum number, for example 100,
at a shorter interval than what is set, the data is still batched and sent
immediately.
|
KNJ_AAR_BATCH_COUNT | Optional | Maximum number of requests that a batch of AAR data contains | Specifies the maximum number of requests that a batch of AAR data can contain before it is
sent to the server. The default value is 100, which means when the number of requests that a batch of AAR data contains reaches 100, this batch of AAR data is sent to the server. |
KNJ_LOG_LEVEL | Optional | Level of information that is printed in the log | Controls the level of information that is printed in the log. The following levels are provided:
By default, the log level is |
SECURITY_OFF | Optional |
|
Enables or disables collection of user sensitive information, such as cookies, HTTP request
context, and database request context.
If you do not specify this variable, the default value of false is used and user sensitive information is not collected. |