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.

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Warning

Note this article is hidden. The information is provided in Monitoring with slc.

Info

To enable on-premises metrics collection, you must register with StrongLoop and get a valid license key.

To get a license key, contact sales@strongloop.

Table of Contents

Running the app

To display metrics on an application in a third-party console running on a local machine, follow these steps.

  1. Change to the application directory by running this command, where <my-app> is the application directory: 

    Code Block
    $ cd <my-app>
  2. Start your application locally under control of StrongLoop Process Manager:

    Code Block
    $ slc start

    You can view metrics data in a third-party console as described below.

StatsD

StatsD is a simple protocol used for aggregating log information. StatsD is also a simple daemon (server) that aggregates and summarizes application metrics. The client communicates with the StatsD server using the StatsD protocol, and the daemon then generates aggregate metrics and relays them to a graphing or monitoring backend.  

For more information on StatsD, see StatsD, what it is and how it can help you

The StatsD Node server:

Other metrics consumers, such as DataDog, have agents that support the StatsD-protocol.  

To use StatsD, set the STRONGLOOP_METRICS environment variable to a StatsD receiver URL of the form:

Syntax

statsd://[host[:port]][/scope]

Where:

  • host is the name of the host where the StatsD server is running; default is "localhost".
  • port is the TCP port the StatsD server is using; default is 8125.
  • scope is a string to scope or identify metrics; for example this might be the name of the application or module.

You can set the environment variable before you deploy your application to Process Manager.  

To set it after you deploy the application, use the slc ctl env-set command, which will automatically restart the application with that environment variable.  For example:

Code Block
$ slc ctl env-set STRONGLOOP_METRICS=statsd://localhost:8125/app1

Example output for app1:

Code Block
app1.cpu.user:0.00907|g
app1.cpu.system:0.01664|g
app1.cpu.total:0.0257|g
app1.heap.used:10698193|g
app1.heap.total:27423366|g
app1.loop.count:127|c

Hosted Graphite

This command forwards metrics data to Hosted Graphite. Host defaults to "localhost", port defaults to 2003.

Code Block
$ slc ctl env-set STRONGLOOP_METRICS=graphite://[<host>][:<port>]

Splunk

This command writes to Splunk using a UDP key-value protocol. Host defaults to localhost, and port is mandatory, since the protocol has no assigned port.

Code Block
$ slc ctl env-set STRONGLOOP_METRICS=splunk://[<host>]:<port>

Redirect
URLhttp://docs.strongloop.com/display/SLC/Monitoring+with+slc