Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

spm-agent-nodejs

Package Overview
Dependencies
Maintainers
1
Versions
104
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spm-agent-nodejs

Node.js monitoring agent for SPM by Sematext

  • 1.0.13
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
272
decreased by-9.63%
Maintainers
1
Weekly downloads
 
Created
Source

spm-agent-nodejs

SPM performance monitoring by Sematext - this is the Node.js monitoring agent for SPM.

Following information is collected and transmitted to SPM (Cloud or On-Premises version):

  • OS Metrics (CPU / Mem)

  • Process Memory

  • EventLoop stats

  • Garbage Collector stats

  • HTTP server stats (requests, error rate, response times etc.) Working for all HTTP servers that use NodeJS http module including "connect" based frameworks like Express.js, Sails.js and others like Hapi.js, ...

    The module is able to run in cluster mode (master/worker).

Status

This package is part of the release tests - please check our blog for updates or contact us npmjs@sematext.com.

Supported Node-Versions: Node >= 0.10, IO.js >= 1.2

Installation


    npm install spm-agent-nodejs

Get a free account and create a Node.js API token at www.sematext.com

Configuration

We use https://www.npmjs.com/package/rc for configuration. This means config parameters can be passed via several config locations commandline args or ENV variables. We recommend to use a file in current directory in INI or JSON format called ".spmagentrc". This file can be generated by providing setting and environment variable and calling a helper script:

    export SPM_TOKEN=YOUR-SPM-TOKEN
    node ./node_modules/spm-agent-nodejs/bin/spmconfig.js

The command above generates following default configuration file:

    # Directory for buffered metrics
    dbDir = ./spmdb

    # Application Token for SPM
    [tokens]
      spm = YOUR-SPM-TOKEN

    [logger]
      # log file directory default is ./spmlogs
      dir = ./spmlogs
      # silent = true means no creation of log files
      silent = false
      # log level for output - debug, info, error, defaults to error to be quiet
      level = error

The only required setting is the SPM Application Token, this could be set via config file ".spmagentrc" or environment variable:

export spmagent_tokens__spm=YOUR-SPM-APP-TOKEN

Please note the use of double "_" for nested properties

Usage

Add this line at the begin of your source code / main script / app.js


    var spmAgent = require ('spm-agent-nodejs')

Troubleshooting

Please visit our WIKI for more information

Please check out spm-metrics-js to monitor any custom metric in your application.

LICENCE

  Copyright (c) Sematext Group, Inc.
  All Rights Reserved

  SPM for NodeJS is free-to-use, proprietary software.
  THIS IS PROPRIETARY SOURCE CODE OF Sematext Group, Inc. (Sematext)
  This source code may not be copied, reverse engineered, or altered for any purpose.
  This source code is to be used exclusively by users and customers of Sematext.
  Please see the full license (found in LICENSE in this distribution) for details on its license and the licenses of its dependencies.

Keywords

FAQs

Package last updated on 13 Mar 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc