A Strapi plugin for supporting Kubernetes health checks and monitoring
npm install strapi-health-plugin

!license
!npm total downloads
!PRs Welcome
!GitHub stars
!Last Commit
A lightweight Strapi plugin that provides health check endpoints for monitoring and Kubernetes readiness/liveness probes.
- ✅ Simple health endpoint at /health
- ✅ Returns uptime, status, and timestamp
- ✅ Perfect for Kubernetes readiness/liveness probes
- ✅ Zero configuration required
- ✅ Minimal performance impact
``bash`
npm install strapi-health-plugin
After installation, rebuild your Strapi application:
`bash`
npm run buildor
strapi build
Once installed, the plugin automatically exposes a health endpoint at:
``
GET /health
`json`
{
"uptime": 19122.561740091,
"message": "OK",
"timestamp": 1696513452150
}
- uptime: Process uptime in secondsmessage
- : Status message ("OK" when healthy)timestamp
- : Current timestamp in milliseconds
`yaml`
readinessProbe:
httpGet:
path: /health
port: 1337
initialDelaySeconds: 30
periodSeconds: 10
`yaml`
livenessProbe:
httpGet:
path: /health
port: 1337
initialDelaySeconds: 60
periodSeconds: 30
`dockerfile`
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD curl -f http://localhost:1337/health || exit 1
1. Ensure you've run npm run build after installationpackage.json
2. Check that the plugin is listed in your dependencies
3. Restart your Strapi application
1. Verify your Strapi server is running
2. Check if custom middleware is blocking the endpoint
3. Ensure no conflicting routes exist
The health endpoint is publicly accessible by default. If you need to restrict access, you can modify the route configuration in your Strapi application.
Contributions are welcome! Please read our Contributing Guidelines before submitting PRs.
This project uses Changesets for automated releases:
`bash``
npm run changeset # Add changeset after changes
git push # Triggers release PR
For security concerns, please see our Security Policy.
MIT © Remi Kristelijn
- 🐛 Report bugs
- 💡 Request features
- 💖 Sponsor the project
---
Made with ❤️ for the Strapi community