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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@strapi-community/plugin-healthcheck

v1.0.5

Published

Adds additional API endpoints for checking health of Strapi Components

Readme

Table of Contents

🚦 Current Status

This package is currently maintained and should be considered Beta in terms of state. I/We are currently accepting contributions and/or dedicated contributors to help develop and maintain this package.

For more information on contributing please see the contrib message below.

🛑 Foreword

This package's lead maintainer is an employee of Strapi however this package is not officially maintained by Strapi Solutions SAS nor Strapi, Inc. and is currently maintained in the free time of the lead maintainer.

[!WARNING] Absolutely no part of this code should be considered covered under any agreement you have with Strapi proper including but not limited to any Enterprise and/or Cloud Agreement you have with Strapi.

✨ Features

These are the primary features that are finished or currently being worked on:

  • [x] Generic ping endpoint to check if the server is running (good for checking network response time)
  • [x] Generic server endpoint to check if the server is running, server uptime, server memory usage, and server/strapi version
  • [x] Generic database endpoint to check if the database is connected, current/max connections, current database uptime, total database size, and database version
  • [x] Generic all endpoint to check all components at once
  • [x] Completely configurable to disable any data you don't want to be shown
  • [ ] Integration with other plugins and providers (Redis, Upload, ect)

🤔 Motivation

The purpose of this package is to have a deeper insight into the health of a Strapi instance. This is especially useful for monitoring and debugging purposes.

🖐 Requirements

[!CAUTION] This plugin will not work with Strapi v3 or v4 projects

Supported Strapi Versions:

| Strapi Version | Plugin Version | Supported | Tested On | |----------------|----------------|-----------|-----------| | v3.x.x | N/A | ❌ | N/A | | v4.x.x | N/A | ❌ | N/A | | v5.x.x | >= 1.0.0 | ✅ | Jan 2025 |

⏳ Installation

Install the plugin in your Strapi project or your Strapi plugin.

| Strapi Version | Plugin Version | Package Manager | Command | |----------------|----------------|-----------------|-------------------------------------------------| | v5.x.x | Latest | Yarn | yarn add @strapi-community/plugin-healthcheck | | v5.x.x | Latest | npm | npm i @strapi-community/plugin-healthcheck |

🔧 Configuration

There is a very simple configuration to tailor the plugin to your needs and enable or disable certain responses (like the database size).

By default, all options are enabled, however you must enable specific endpoints in the Users-Permissions configuration or API Tokens Configuration to access them.

Sample Configuration

// ./config/plugins.js

module.exports = (env) => ({
// ...
  healthcheck: {
    enabled: true,
    config: {
      server: {
        uptime: true,
        memory: true,
        version: true,
      },
      database: {
        client: true,
        connections: true,
        uptime: true,
        size: true,
        version: true,
      },
    },
  },
// ...
});

Configuration Options

| Option | Type | Default | Description | |------------------------|---------|---------|--------------------------------| | server | Object | {} | Server configuration options | | server.uptime | Boolean | true | Show server uptime | | server.memory | Boolean | true | Show server memory usage | | server.version | Boolean | true | Show server version | | database | Object | {} | Database configuration options | | database.client | Boolean | true | Show database client | | database.connections | Boolean | true | Show database connections | | database.uptime | Boolean | true | Show database uptime | | database.size | Boolean | true | Show database size | | database.version | Boolean | true | Show database version |

API Endpoints

| Endpoint | Description | Sample Response | |-----------------------------|------------------------------------------------------------|-------------------------------------| | /api/healthcheck/ping | Responds with a simple "Pong" | Sample | | /api/healthcheck/server | Responds with information about the Strapi and Node Server | Sample | | /api/healthcheck/database | Responds with information about the connected database | Sample | | /api/healthcheck/all | Responds with with server and database information | Sample |

Ping Endpoint Sample

{
  "data": {
    "message": "pong"
  }
}

Server Endpoint Sample

{
  "data": {
    "alive": true,
    "uptime": {
      "raw": 10.052894558,
      "text": "0d 0h 0m 10s",
      "days": 0,
      "hours": 0,
      "minutes": 0,
      "seconds": 10
    },
    "memory": {
      "memory": {
        "total": {
          "raw": 148.984375,
          "text": "149 MB"
        },
        "used": {
          "raw": 117.34453582763672,
          "text": "117 MB"
        },
        "free": {
          "raw": 31.63903045654297,
          "text": "32 MB"
        },
        "max": {
          "raw": 4144,
          "text": "4144 MB"
        },
        "percent": {
          "totalRaw": 78.77086269336654,
          "totalText": "78.77 %",
          "maxRaw": 2.831986143782332,
          "maxText": "2.83 %"
        }
      }
    },
    "version": {
      "application": "0.1.0",
      "strapi": "5.7.0"
    }
  }
}

Database Endpoint Sample

PostgreSQL

{
  "data": {
    "alive": true,
    "client": "postgres",
    "connections": {
      "max": 100,
      "current": "18"
    },
    "uptime": {
      "raw": 2426042.935729,
      "text": "28d 1h 54m 2s",
      "days": 28,
      "hours": 1,
      "minutes": 54,
      "seconds": 2
    },
    "size": {
      "raw": 17.502691,
      "text": "17.50 MB"
    },
    "version": "PostgreSQL: 16.6"
  }
}

MySQL/MariaDB

{
  "data": {
    "alive": true,
    "client": "mysql",
    "connections": {
      "max": 151,
      "current": 13
    },
    "uptime": {
      "raw": 170685,
      "text": "1d 23h 24m 45s",
      "days": 1,
      "hours": 23,
      "minutes": 24,
      "seconds": 45
    },
    "size": {
      "raw": 2.6050560000000003,
      "text": "2.61 MB"
    },
    "version": "MariaDB: 11.6.2"
  }
}

SQLite

[!NOTE] SQLite does not have a max connection limit, so that value is always 1.

[!IMPORTANT] SQLite does not have an uptime value, so the Node process uptime is used instead.

{
  "data": {
    "alive": true,
    "client": "sqlite",
    "connections": {
      "max": 1,
      "current": 1
    },
    "uptime": {
      "raw": 4.93527706,
      "text": "0d 0h 0m 4s",
      "days": 0,
      "hours": 0,
      "minutes": 0,
      "seconds": 4
    },
    "size": {
      "raw": 0.90112,
      "text": "0.90 MB"
    },
    "version": "SQLite: 3.46.1"
  }
}

All Endpoint Sample

{
  "data": {
    "server": {
      "alive": true,
      "uptime": {
        "raw": 5.126152349,
        "text": "0d 0h 0m 5s",
        "days": 0,
        "hours": 0,
        "minutes": 0,
        "seconds": 5
      },
      "memory": {
        "memory": {
          "total": {
            "raw": 148.984375,
            "text": "149 MB"
          },
          "used": {
            "raw": 117.34453582763672,
            "text": "117 MB"
          },
          "free": {
            "raw": 31.63903045654297,
            "text": "32 MB"
          },
          "max": {
            "raw": 4144,
            "text": "4144 MB"
          },
          "percent": {
            "totalRaw": 78.77086269336654,
            "totalText": "78.77 %",
            "maxRaw": 2.831986143782332,
            "maxText": "2.83 %"
          }
        }
      },
      "version": {
        "application": "0.1.0",
        "strapi": "5.7.0"
      }
    },
    "database": {
      "alive": true,
      "client": "postgres",
      "connections": {
        "max": 100,
        "current": "15"
      },
      "uptime": {
        "raw": 2503002.43527,
        "text": "28d 23h 16m 42s",
        "days": 28,
        "hours": 23,
        "minutes": 16,
        "seconds": 42
      },
      "size": {
        "raw": 17.502691,
        "text": "17.50 MB"
      },
      "version": "PostgreSQL: 16.6"
    }
  }
}

Contributing

I/We are actively looking for contributors, maintainers, and others to help shape this package.

If interested please feel free to open up a GitHub issue/PR or ping DMehaffy on Discord.

[!NOTE] This package is maintained collectively by the strapi community organization. While there may be a lead maintainer, they are not the sole maintainer of this code and this code does not belong to the lead maintainer.

License

See the LICENSE file for licensing information.