npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

express-status-monitor-plus

v3.1.1

Published

A modern, real-time monitoring dashboard for Express.js featuring persistent metrics, upstream health checks, response percentiles, and zero-config setup.

Readme

Express Status Monitor Plus is a lightweight, production-ready Application Performance Monitoring (APM) tool. It provides a beautiful, modern dashboard to track your server's health in real-time.

As an independent, heavily upgraded fork of the original express-status-monitor, this Plus version introduces critical enterprise features like persistent metrics across restarts, P50/P95/P99 percentiles, dark mode, and upstream health checks—all without the steep cost of commercial APMs like Datadog or New Relic.

✨ Why choose "Plus"? (Key Features)

  • 💾 Persistent Storage: Metrics survive process restarts and deployments via a highly optimized, file-based ring buffer.
  • 📊 Advanced Percentiles: Built-in reservoir sampling for P50, P95, and P99 response time tracking to catch edge-case latency.
  • 🏥 Service Health Checks: Monitor the uptime of your upstream services and third-party APIs directly from the dashboard.
  • 🎨 Modernized UI: Glassmorphism headers, dark/light/system themes, interactive charts with smooth animations.
  • Ultra-Lightweight: Just one single middleware and a ~200 KB bundled frontend. Zero massive dependencies.
  • 📈 Comprehensive Metrics: Tracks CPU, memory, heap, load average, event loop latency, response times, requests/sec, and HTTP status codes.

📦 Installation

npm install express-status-monitor-plus

Requires Node.js ≥ 18

🚀 Quick Start

Add the monitor as the very first middleware in your Express application, before any other routes or middleware.

const express = require('express');
const statusMonitor = require('express-status-monitor-plus');

const app = express();

// Initialize the dashboard and data collection
app.use(statusMonitor());

app.get('/', (req, res) => res.send('Hello World'));

app.listen(3000, () => {
  console.log('Server running on http://localhost:3000');
  console.log('Dashboard available at http://localhost:3000/status');
});

Navigate to http://localhost:3000/status to view your live metrics!


⚙️ Advanced Configuration

Pass a configuration object to tailor the dashboard exactly to your infrastructure needs.

app.use(statusMonitor({
  title: 'Express Status Monitor Plus',       // Dashboard page title
  path: '/status',                   // Dashboard URL path
  socketPath: '/socket.io',          // Socket.io endpoint path
  darkMode: 'auto',                  // 'auto' | 'dark' | 'light'
  
  // Storage & Persistence
  dataDir: '/var/data/my-app/metrics', // Custom metrics directory
  flushInterval: 30,                   // Seconds between disk writes
  
  // Data retention rules (interval in seconds, retention in data points)
  spans: { interval: 5,  retention: 60 },  // 1 point/5sec, keep for 5 min

  // Exclude specific routes from tracking
  ignoreStartsWith: '/admin',

  // Toggle specific charts
  chartVisibility: {
    cpu: true,
    mem: true,
    load: true,
    heap: true,
    eventLoop: true,
    responseTime: true,
    rps: true,
    statusCodes: true,
  },
}));

🏥 Upstream Health Checks

Keep an eye on the databases, microservices, or external APIs your Express app relies on. Endpoints returning a 200 OK are marked as healthy, while timeouts or other status codes trigger a failure alert on your dashboard.

app.use(statusMonitor({
  healthChecks: [
    {
      protocol: 'http',
      host: 'localhost',
      path: '/api/internal/health',
      port: '3000',
    },
    {
      protocol: 'https',
      host: 'api.stripe.com',
      path: '/v1/ping',
      port: '443',
    },
  ],
}));

🔒 Securing the Dashboard in Production

You should absolutely protect your /status route in production. The middleware exposes a pageRoute handler that easily wraps around your existing authentication strategies.

Example using http-auth (Basic Auth):

const auth = require('http-auth');
const basic = auth.basic({ realm: 'Monitor Area' }, (user, pass, callback) => {
  callback(user === 'admin' && pass === 'supersecret');
});

const statusMonitor = require('express-status-monitor-plus')({ path: '' });

app.use(statusMonitor.middleware);
app.get('/status', basic.check(statusMonitor.pageRoute));

🔌 Custom Socket.io Instances

If your application already leverages WebSockets, pass your existing Socket.io instance to prevent port conflicts and reuse your existing upgrade handlers.

const http = require('http');
const { Server } = require('socket.io');
const express = require('express');

const app = express();
const server = http.createServer(app);
const io = new Server(server);

app.use(require('express-status-monitor-plus')({
  websocket: io,
  port: 3000,
}));

🛠 Development

# Install dependencies
npm install

# Build assets (Rollup: JS + CSS + HTML → dist/)
npm run build

# Start dev server with live reload
npm run dev

# Watch mode (rebuild on file changes)
npm run build:watch

# Run tests
npm test

# Lint
npm run lint

📄 License

MIT