Lightweight Node.js monitoring without Prometheus or Grafana
I've been building StatLite, an open-source monitoring dashboard for applications running on small servers and VPSs.
Version 0.9.0 adds native support for Express and Fastify using existing instrumentation libraries:
- Express: express-prom-bundle
- Fastify: fastify-metrics
StatLite reads the metrics endpoints directly and stores historical data in SQLite.
It tracks HTTP requests, errors, average response time, process CPU, V8 heap usage and restarts, depending on the exporter configuration. It also automatically highlights elevated HTTP 5xx rates.
StatLite itself is a single Go binary using around 12 MiB of idle RAM.
No separate Prometheus server, Grafana or external monitoring service.
StatLite also supports Spring Boot, Quarkus, Micronaut, Django, Flask, FastAPI, Caddy and Traefik. Applications without a supported exporter can expose metrics directly using the lightweight StatLite Metrics v1 JSON format.
Integration guides:
GitHub (MIT): https://github.com/PVRLabs/statlite
I'd be interested in feedback from people self-hosting Node.js applications.
9
u/plymer968 2d ago
As someone running a tiny little VPS I was exploring some monitoring solutions and everything is just soooo overkill
This is awesome, but unfortunately I’m running a Hono backend. What are the chances you’d support that alongside Express and Fastify?
3
u/uwemaurer 2d ago
We self host a lot of node (and JVM) appliations. My feedback is that even though I love SQLite I don't think it is the right tool for storing monitoring timeseries. This will get slow once you have many timeseries with longer history.
I would replace the storage with VictoriaMetrics (https://github.com/victoriametrics/VictoriaMetrics) instead.
11
u/shiny0metal0ass 2d ago
Holy shit, its a real project. I havent seen one of those on reddit in many moons.
2
u/danieldhp 2d ago
Sadly I just got laid off, but we was looking for simple alternatives to DD, we tried new relic but it's just awful, we also tried to build our own in house solution using open telemetry, but too much work when you have over 80 backend services. Fuck them, let they pay 600k/year to DD and I will try this on my own smaller projects. But this looks awesome man, keep it up, I will definitely send a PR if I can do something to help
2
u/gnomodojardim 2d ago
Looks great! Any plans on adding support for TanStack Start apps?
2
u/bwainfweeze 2d ago
I like using grafana but I got the bright idea to try to contribute some bug fixes and boy are complex react applications no fun to debug. A lot of the open issues were trying really hard not to complain about how serpentine the code was and how locked in some wrong assumptions were.
I think trying to support a million backends has also gotten the better of them.
1
u/chipstastegood 2d ago
Does it work with AdonisJS?
1
u/Hostman_com 2d ago
Your docs already mention independent reachability checks. A worked example could make that easier to set up: StatLite beside the app, plus an external check of its public URL.
On a test VPS, stop the app first, then separately shut down the VPS. Show which check detects each failure and confirm the notification arrives in both cases. That would demonstrate what still works when the dashboard itself is unreachable.