Introduction

nJAMS Agent collects metrics from a wide array of inputs and write them into a wide array of outputs.

nJAMS Agent is a standalone binary written in Go, which can be started on any Linux or Windows system and does not require external dependencies.

nJAMS Agent is plugin-driven, which means you can easily add input plugins to listen to various applications and systems. The default output plugin allows nJAMS Agent to send metrics to nJAMS Argos via JMS or HTTP(S). There are several plugins already available for nJAMS Agent, see list of Input plugins and Output plugins.

Architecture nJAMS Argos

One of the input sources for nJAMS Agent is the Subagent of nJAMS Client. Current versions of nJAMS Clients have a built-in Subagent that communicates with nJAMS Agent via UDP, port 6450 by default. The Subagent of nJAMS Client can collect metrics from inside of the runtime environment of the monitored system.

The following figure shows exemplary how nJAMS Client monitors process transactions of services from the MuleSoft® Runtime Environment and nJAMS Subagent measures various metrics of Mule Runtime at the same time. In addition, nJAMS Agent collects metrics from outside of the Mule Runtime, respectively from the host.

Architecture Client

The following figure illustrates the distributed monitoring capabilities of nJAMS. nJAMS Clients and nJAMS Agents collect events and metrics from your entire environment and passes the information to nJAMS Server, the central service of nJAMS.

Architecture distributed monitoring

Concept

nJAMS Agent is the plugin driven agent component of nJAMS Argos. nJAMS Agent collects, processes, and sends metrics to nJAMS Argos, which in turn represents a component within nJAMS Server. Metrics are the internal representation used to model data during processing.

On the one side input plugins collect metrics, on the other side output plugins send metrics. Input and output plugins are configured in nJAMS Agent configuration file, which is by default <your_path>/agent/config/njams_agent.conf.

Metrics:

Metrics contain four main components:

  • Name: Description and namespace for the measured metric.
  • Tags: Key/Value string pairs and usually used to identify the metric.
  • Fields: Key/Value pairs that are typed and usually contain the metric data.
  • Timestamp: Date and time associated with the fields.

For example, a message containing system memory metric sent by nJAMS Agent may look like this:

{
    "metrics": [{
            "fields": {
                "active": 811966464,
                "available": 15873630208,
                "available_percent": 94.31000396183015,
                "buffered": 277213184,
                "cached": 838156288,
                "commit_limit": 9487306752,
                "committed_as": 1508069376,
                "dirty": 53248,
                "free": 15235678208,
                "high_free": 0,
                "high_total": 0,
                "huge_page_size": 2097152,
                "huge_pages_free": 0,
                "huge_pages_total": 0,
                "inactive": 639619072,
                "low_free": 0,
                "low_total": 0,
                "mapped": 115482624,
                "page_tables": 8847360,
                "shared": 192049152,
                "slab": 71651328,
                "swap_cached": 33787904,
                "swap_free": 911011840,
                "swap_total": 1071640576,
                "total": 16831332352,
                "used": 480284672,
                "used_percent": 2.853515467199064,
                "vmalloc_chunk": 0,
                "vmalloc_total": 35184372087808,
                "vmalloc_used": 0,
                "wired": 0,
                "write_back": 0,
                "write_back_tmp": 0
            },
            "name": "mem",
            "tags": {
                "host": "vsltibco03",
                "id": "vsltibco03",
                "type": "server"
            },
            "timestamp": 1578473750
        }
    ]
}
Input plugins:

nJAMS Agent input plugins collect metrics from the system, services, or third party APIs.

A sample configuration for an input plugin measuring CPU usage may be as follows:

[[inputs.cpu]]
    percpu = false
    totalcpu = true
    collect_cpu_time = false
    report_active = false
Output plugins:

nJAMS Agent output plugins write metrics to various destinations.

A sample configuration for an output plugin that sends metrics to nJAMS Argos via TIBCO EMS may be as follows:

[[outputs.ems]]
    url = "tcp://vslems01:7222,tcp://vslems01:7224"
    queue = "njams.metrics"
    username = "njams"
    password = "njams"
    data_format = "njams"