All Projects → sematext → Spm Agent Nodejs

sematext / Spm Agent Nodejs

Licence: apache-2.0
NodeJS Monitoring Agent

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Spm Agent Nodejs

Myperf4j
High performance Java APM. Powered by ASM. Try it. Test it. If you feel its better, use it.
Stars: ✭ 2,281 (+4372.55%)
Mutual labels:  monitoring, agent, apm, performance-monitoring, performance-metrics
Spm Agent Mongodb
Sematext Agent for monitoring MongoDB
Stars: ✭ 7 (-86.27%)
Mutual labels:  monitoring, devops, agent, performance-monitoring, performance-metrics
Apm Agent Nodejs
Elastic APM Node.js Agent
Stars: ✭ 467 (+815.69%)
Mutual labels:  devops, tracing, apm, performance-monitoring, performance-metrics
Scouter
Scouter is an open source APM (Application Performance Management) tool.
Stars: ✭ 1,792 (+3413.73%)
Mutual labels:  monitoring, agent, apm, performance-monitoring, performance-metrics
Stackimpact Go
DEPRECATED StackImpact Go Profiler - Production-Grade Performance Profiler: CPU, memory allocations, blocking calls, errors, metrics, and more
Stars: ✭ 276 (+441.18%)
Mutual labels:  monitoring, tracing, agent, performance-metrics
Apm Server
APM Server
Stars: ✭ 878 (+1621.57%)
Mutual labels:  devops, apm, performance-monitoring, performance-metrics
Opbeat Node
DEPRECATED - See Elastic APM instead: https://github.com/elastic/apm-agent-nodejs
Stars: ✭ 155 (+203.92%)
Mutual labels:  devops, apm, performance-monitoring, performance-metrics
Apm Agent Rum Js
Elastic APM Real User Monitoring JavaScript agent
Stars: ✭ 166 (+225.49%)
Mutual labels:  tracing, apm, performance-monitoring, performance-metrics
Apm Agent Php
Elastic APM PHP Agent
Stars: ✭ 129 (+152.94%)
Mutual labels:  monitoring, tracing, apm, performance-monitoring
Pinpoint
APM, (Application Performance Management) tool for large-scale distributed systems.
Stars: ✭ 11,883 (+23200%)
Mutual labels:  monitoring, tracing, agent, apm
Stackimpact Nodejs
DEPRECATED StackImpact Node.js Profiler - Production-Grade Performance Profiler: CPU, memory allocations, async calls, errors, metrics, and more
Stars: ✭ 46 (-9.8%)
Mutual labels:  monitoring, tracing, agent, performance-metrics
Inspectit
inspectIT is the leading Open Source APM (Application Performance Management) tool for analyzing your Java (EE) applications.
Stars: ✭ 513 (+905.88%)
Mutual labels:  monitoring, agent, apm, performance-metrics
Goappmonitor
Golang application performance data monitoring.
Stars: ✭ 478 (+837.25%)
Mutual labels:  monitoring, tracing, agent, performance-metrics
Apm Agent Go
Official Go agent for Elastic APM
Stars: ✭ 269 (+427.45%)
Mutual labels:  monitoring, tracing, apm
Stackimpact Java
StackImpact Java Profiler - Production-Grade Performance Profiler: CPU, locks, runtime metrics, and more
Stars: ✭ 7 (-86.27%)
Mutual labels:  monitoring, agent, performance-metrics
javametrics
Application Metrics for Java™ instruments the Java runtime for performance monitoring, providing the monitoring data visually with its built in dashboard
Stars: ✭ 19 (-62.75%)
Mutual labels:  agent, performance-metrics, performance-monitoring
Appmetrics
Node Application Metrics provides a foundational infrastructure for collecting resource and performance monitoring data for Node.js-based applications.
Stars: ✭ 864 (+1594.12%)
Mutual labels:  monitoring, performance-monitoring, performance-metrics
App perf
Open source application performance monitoring tool with emphasis on ease of setup and use. Providing similar functionality like NewRelic/AppNeta/Skylight etc.
Stars: ✭ 353 (+592.16%)
Mutual labels:  monitoring, apm, performance-monitoring
Vsphere2metrics
VMware vSphere Performance Metrics Integration with Graphite & InfluxDB
Stars: ✭ 28 (-45.1%)
Mutual labels:  monitoring, performance-monitoring, performance-metrics
uptrace
Open source APM: OpenTelemetry traces, metrics, and logs
Stars: ✭ 1,187 (+2227.45%)
Mutual labels:  apm, tracing, performance-monitoring

spm-agent-nodejs

build status

npm-stats

This is the Node.js monitoring agent for Sematext Cloud.

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

  • OS Metrics (CPU / Mem)
  • Process Memory
  • EventLoop stats
  • Garbage Collector stats
  • Web server stats (requests, error rate, response times etc.) Working for all web servers frameworks that use Node.js http/https module including
    • "connect" based frameworks
    • Express.js,
    • Sails.js
    • Hapi.js
    • Restify
    • and others ...

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

Status

Supported Node-Versions: Node >= 6.x.

Please check our blog for more information or contact us at [email protected].

Installation


    npm install spm-agent-nodejs

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

Configuration

We use https://www.npmjs.com/package/rc for configuration. This means config parameters can be passed via several config locations command-line 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 calling a helper script:

    export MONITORING_TOKEN=YOUR-NODEJS-MONITORING-TOKEN
    export INFRA_TOKEN=YOUR-INFRA-MONITORING-TOKEN
    node ./node_modules/spm-agent-nodejs/bin/spmconfig.js

The command above generates following default configuration file (YAML format):

    # Directory for buffered metrics
    dbDir: ./spmdb

    # Application Token for SPM
    tokens:
      monitoring: YOUR-NODEJS-MONITORING-TOKEN
      infra: YOUR-INFRA-MONITORING-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__monitoring=YOUR-NODEJS-MONITORING-TOKEN

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

Configuration via Environment Variables

export MONITORING_TOKEN=YOUR-NODEJS-MONITORING-TOKEN
export INFRA_TOKEN=YOUR-INFRA-MONITORING-TOKEN
# default is SaaS at sematext.com, URL needs to be changed for on-prem to the local SPM receiver
export SPM_RECEIVER_URL=https://local-spm-server:8084/_bulk
export EVENTS_RECEIVER_URL=https://local-event-receiver/
export SPM_DB_DIR=/tmp
export SPM_LOG_DIRECTORY=./logs
export SPM_LOG_LEVEL=error
export SPM_LOG_TO_CONSOLE=true
export HTTPS_PROXY=http://my-local-proxy-server

Changing API endpoints for Sematext Cloud EU

export SPM_RECEIVER_URL=https://spm-receiver.eu.sematext.com/receiver/v1
export EVENTS_RECEIVER_URL=https://event-receiver.eu.sematext.com

Usage

Method 1: Preloading spm-agent-nodejs - no source code modifications requred

The command line option "-r" preloads node modules before the actual application is started. In this case the original source code needs no modification:

  node -r './spm-agent-nodejs' yourApp.js

Method 2: Add spm-agent-nodejs to your source code

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

# add spm-agent-nodejs to your project
npm i spm-agent-nodejs --save
require('spm-agent-nodejs')

With PM2

Use the absolute path to your .env file to enable PM2 monitoring.

// load env vars if you're using dotenv
require('dotenv').config({ path: '/absolute/path/to/your/project/.env' })
// start agent
require('spm-agent-nodejs')
pm2 start app.js -i max

Results

Troubleshooting

Please visit our documentation for more information.

Other monitoring packages

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

Sematext Docker Agent (see also: https://sematext.com/docker and https://sematext.com/kubernetes)

LICENSE

Apache 2 - see LICENSE file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].