
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
@strapi-community/plugin-healthcheck
Advanced tools
Adds additional API endpoints for checking health of Strapi Components
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.
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.
These are the primary features that are finished or currently being worked on:
ping
endpoint to check if the server is running (good for checking network response time)server
endpoint to check if the server is running, server uptime, server memory usage, and server/strapi versiondatabase
endpoint to check if the database is connected, current/max connections, current database uptime, total database size, and database versionall
endpoint to check all components at onceThe 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.
[!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 |
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 |
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.
// ./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,
},
},
},
// ...
});
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 |
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 |
{
"data": {
"message": "pong"
}
}
{
"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"
}
}
}
{
"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"
}
}
{
"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"
}
}
[!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"
}
}
{
"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"
}
}
}
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.
See the LICENSE file for licensing information.
FAQs
Adds additional API endpoints for checking health of Strapi Components
The npm package @strapi-community/plugin-healthcheck receives a total of 139 weekly downloads. As such, @strapi-community/plugin-healthcheck popularity was classified as not popular.
We found that @strapi-community/plugin-healthcheck demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
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.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.