Prometheus

Prometheus

By Xander Denecker

strapi-prometheus is a simple plugin that exposes a metrics url for prometheus to scrape.

Latest version

v3.0.0

released October 13, 2026

npm install strapi-prometheus

๐Ÿ“Š Strapi Prometheus Plugin

npm downloads npm version license GitHub stars

A powerful middleware plugin that adds comprehensive Prometheus metrics to your Strapi application using @prometheus-io/client ๐Ÿ“ˆ. Monitor your API performance, track system resources, and gain valuable insights into your application's behavior with just a few lines of configuration! ๐Ÿš€

โœจ Features

  • ๐Ÿš€ Real-time API Metrics - Track HTTP request duration, payload sizes, and response codes with intelligent route normalization
  • ๐Ÿ“ˆ System Monitoring - Collect Node.js process metrics as recommended by Prometheus
  • ๐Ÿ”’ Private by Default - Dedicated metrics server binds to 127.0.0.1:9000, isolated from your main application and not reachable from outside the host until you opt in
  • ๐Ÿท๏ธ Custom Labels - Add custom labels to categorize and filter your metrics across environments ๐ŸŒ
  • ๐Ÿ“Š Database Lifecycle Tracking - Monitor Strapi lifecycle events (create, update, delete) duration โšก
  • ๐Ÿ”Œ Easy Integration - Simple configuration with sensible defaults - get started in minutes!
  • ๐Ÿ†” Version Tracking - Monitor Strapi version information for deployment tracking
  • ๐ŸŽฏ Smart Path Normalization - Flexible normalization with regex patterns or custom functions to group similar routes for better metric cardinality ๐Ÿ“Š
  • ๐Ÿ“ฆ TypeScript Support - Built with TypeScript for better developer experience

โšก Installation

1. Install the package ๐Ÿ“ฆ

npm install strapi-prometheus
# or
yarn add strapi-prometheus
# or
pnpm add strapi-prometheus

2. Enable the plugin โš™๏ธ

// config/plugins.js
module.exports = {
  prometheus: {
    enabled: true,
  },
};

Start Strapi and metrics are served at http://127.0.0.1:9000/metrics ๐Ÿ“Š. See Configuration for custom labels, server settings, and path normalization.

[!CAUTION] The metrics endpoint is not authenticated. Read the security policy before exposing it beyond localhost.

๐Ÿค Compatibility

Strapi VersionPlugin VersionNode.jsStatus
v5.57+v3.x.xโ‰ฅ 22โœ… Fully Supported โญ
v5.xv2.x.xโ‰ฅ 18๐Ÿ”’ Security fixes only
v4.xv1.x.xโ€”โŒ EOL ๐Ÿ”ง

Upgrading? See the migration guides for v2 โ†’ v3 and v1 โ†’ v2.

๐Ÿ“– Documentation

๐Ÿ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ‘จโ€๐Ÿ’ป Author & Maintainer

Xander Denecker (@XanderD99)

๐Ÿ™ Acknowledgments


โญ If this plugin helps you, please consider giving it a star on GitHub!

Submit your content

Share your work with the community and get it listed in the Strapi ecosystem for everyone to discover and use.

Submit
Submit your content