NOTE
StrongLoop Arc and slc are no longer under active development, and will soon be deprecated. Arc's features are being included in the IBM API Connect Developer Toolkit: Please use it instead.
Skip to end of metadata
Go to start of metadata

Overview

StrongLoop Process Manager (PM) enables you to gather performance metrics for Node.js processes.  

How to use

Follow Setting up monitoring to setup your application for monitoring.  

Then, depending on whether you want to use Arc or a third-party console, follow the instructions in:

 

Non-public Information

Metrics API

Strong agent provides hooks for integration with other metrics aggregators, such as statsd.  For more information, see Integrating with third-party consoles.

Use is straightforward:

The callback function has two parameters:

  • name, a string identifying the metric.  See Metrics name strings below.
  • value, a number that is the value of the metric.

The agent reports metrics every 60 seconds. The reported metrics are for the last interval only, that is, they cover only the last 60 seconds. All values are for the current process only.

The above code sample is for illustration purposes: it exits immediately, and so will not actually report any metrics.  Here is a slightly more complex code sample that will report metrics:

Available metrics

Metric NameDescription
CPU metrics

cpu.user

User CPU time. CPU time directly attributable to execution of the userspace process, expressed as a percentage of wall clock time. Can exceed 100% on multi-core systems.

cpu.total

Total CPU time. Sum of user and system time, expressed as a percentage of wall clock time. Can exceed 100% on multi-core systems.

cpu.system

System CPU time. CPU time spent inside the kernel on behalf of the process, expressed as a percentage of wall clock time. Can exceed 100% on multi-core systems.

CPU time is elapsed wall clock time when the CPU is executing instructions on behalf of the process, that is, when the process or its corresponding kernel thread is actually running.

Event loop metrics
loop.countNumber of event loop ticks in the last interval.
loop.averageMean average tick time in milliseconds.
loop.minimumShortest (fastest) tick in milliseconds.
loop.maximumLongest (slowest) tick in milliseconds.
Heap metrics
heap.total

Total size of the V8 heap, expressed in bytes.

The V8 heap stores JavaScript objects and values, excluding integers in the range -2,147,483,648 to 2,147,483,647. Note: the exact range depends on the processor architecture.

heap.used

The part of the V8 heap that is currently in use. Expressed in bytes.

The V8 heap stores JavaScript objects and values, excluding integers in the range -2,147,483,648 to 2,147,483,647. Note: the exact range depends on the processor architecture.

gc.heap.used

The part of the V8 heap that is still in use after a minor or major garbage collector cycle, expressed in bytes.

Strong agent reports this metric only when the garbage collector actually runs (periodically, as needed).

The V8 heap stores JavaScript objects and values, excluding integers in the range -2,147,483,648 to 2,147,483,647. Note: the exact range depends on the processor architecture.

Not available in StrongLoop Arc.

HTTP metrics
http.connections.count

Number of new HTTP connections in the last interval.

Not available in StrongLoop Arc.

Message queue metrics
messages.in.count

Number of received strong-mq or axon messages.

Not available in StrongLoop Arc.

messages.out.count

Number of sent strong-mq or axon messages.

Not available in StrongLoop Arc.

Third-party module metrics

StrongLoop Process Manager collects metrics for a number of third-party modules, reported as:

  • <module>.count

  • <module>.average

  • <module>.maximum

  • <module>.minimum

The following table lists supported modules and recorded metrics:

modulemetric
loopback-datasource-jugglerQuery time in ms (reported as dao.<metric>)
leveldownQuery time in ms
memcacheQuery time in ms (reported as memcached.<metric>)
memcachedQuery time in ms
mongodbQuery time in ms
mysqlQuery time in ms
postgresQuery time in ms
redisQuery time in ms
riak-jsQuery time in ms (reported as riak.<metric>)
oracleQuery time in ms (reported as oracle.<metric>)

Process Manager reports metrics once per time interval. For modules with more than one command or query method, PM reports the sum of query times for individual methods.

For example, the strong-oracle module has .execute().commit() and .rollback() methods. PM sums reponse times for those methods and reports them as one metric, where:

  • oracle.count is the number of calls in the last interval
  • oracle.average the mean average query response time
  • oracle.maximum the slowest query response time

  • oracle.minimum the fastest query response time

Examples:

 

 

 

  • No labels