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

spm-agent

Package Overview
Dependencies
Maintainers
3
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spm-agent

Node.js agent framework for SPM by Sematext

  • 1.30.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
207
decreased by-52.08%
Maintainers
3
Weekly downloads
 
Created
Source

SPM Agent Framework for Node.js

  • spm-agent is used in: spm-agent-nodejs, spm-agent-mongodb and sematext-agent-docker
  • SPM: http://sematext.com/spm (performance monitoring, alerting, etc.)
  • Node.js monitoring: http://sematext.com/spm/integrations/nodejs-monitoring.html

Functionality

  • Sender interface to SPM backend receivers
  • Buffering metrics to disk in case of network outages (using NeDB)
  • Limit the file size of buffers
  • Reconnect after failures
  • Logging functions
  • Configuration handling
  • Pluggable agents

Example to implement a monitoring agent:


var SpmAgent = require('spm-agent')
var client = new SpmAgent()
var testAgent = client.createAgent(new SpmAgent.Agent ({
  start: function (agent) {
    // initialize your metrics collector ...
    this.tid = setInterval(function () {
      // get every 30 seconds some metrics 
      // SPM gets an array of metrics for a specific app
       agent.addMetrics({name: 'test-app', value: [1, 2, 3]})
    }, client.config.collectionInterval)
  }
}))
// monitor which values we added by "addMetrics"
testAgent.on ('metrics', console.log)

Let us know about monitoring agents you need, maybe you like to contribute with your domain expertise!

Please check spm-metrics-js to ship your application specific metrics to SPM.

Keywords

FAQs

Package last updated on 06 May 2016

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