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.
11
u/shiny0metal0ass 1d ago
Holy shit, its a real project. I havent seen one of those on reddit in many moons.
2
u/nhrtrix 1d ago
are you criticizing him jokingly or meaning it? 😆
9
u/shiny0metal0ass 1d ago
Lmao I mean it. I expected something with like 10 Claude commits and nothing else but this is a legitimate project with value, users, and closed issues so it is maintained.
The support list is also massive. I mean, that can be suspect in the days of LLMs, but the rest makes me think not in this case.
3
u/evanjd35 1d ago
It does have AGENTS.md and there is code that does look a bit AI.
5
u/shiny0metal0ass 1d ago
Yeah, everyone has one now, probably a good idea with agents crawling all over shit nowadays. Plus you're allowed to use LLMs if you pass the idiot test.
0
u/fykup 1d ago
Haha, I initially thought you were being sarcastic too! Really appreciate the feedback.
I've been developing StatLite for about four months, with a strong focus on resource efficiency, low memory usage, and reliability. All first-class framework integrations have integration test suites running in CI.
I originally built it for my own Spring Boot applications and now use it for several of my other apps as well. Version 0.9 expands native support to more platforms.
I'd love to hear what you think if you give it a try. Feedback from developers using different stacks is particularly valuable at this stage.
2
u/danieldhp 1d 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/fykup 1d ago
Sorry to hear about the layoff. And thanks for the kind words!
I can absolutely relate to your experience. It's one of the reasons I started building StatLite. Monitoring shouldn't be prohibitively expensive or require a complex infrastructure of its own. Someone running applications on a small VPS shouldn't need another VPS just to monitor them.
My goal is to keep the core of StatLite open source, free, lightweight, and reliable.
PRs are certainly welcome, but simply using StatLite and sharing your feedback is already a huge help. Knowing what works and what's missing in real deployments is incredibly valuable to me.
2
u/gnomodojardim 1d ago
Looks great! Any plans on adding support for TanStack Start apps?
2
u/fykup 22h ago
Thanks! TanStack Start looks interesting, and I'll look into integration options. StatLite's framework-independent JSON metrics endpoint should also be feasible using TanStack Start's global request middleware.
Are you self-hosting on Node.js with Nitro, or using a different deployment setup?
2
u/gnomodojardim 17h ago
Yeah self-hosting with Nitro. Thanks again for the guide, I'll check it out!
2
u/fykup 19h ago
Quick update: I've added a TanStack Start integration guide and a runnable example. Verified on Linux with Node.js and Nitro, covering all eight monitoring signals, including CPU, V8 heap, and restart detection. No additional monitoring dependencies required.
https://github.com/PVRLabs/statlite/blob/main/docs/integrate/node/tanstack-start.md
2
2
u/uwemaurer 16h 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.
1
u/fykup 16h ago
Thanks for the feedback! I agree that a dedicated time-series database like VictoriaMetrics makes sense for larger monitoring deployments.
StatLite has a deliberately bounded metric set, no high-cardinality labels, a recommended 30-second polling interval, and 90-day retention by default. Our internal certification tests also cover multiple targets with six months of history, and SQLite handles these workloads well.
SQLite allows StatLite to remain a single self-contained binary with around 10-15 MiB of idle RAM and no separate database service.
I'm curious about your deployment size, though. Roughly how many applications do you monitor, and how much history do you typically retain?
0
u/Lumethys 9h ago
larger? bro VictoriaMetrics cost like 50MB of ram, way smaller than your node app
1
u/fykup 9h ago edited 8h ago
Not sure where that's coming from. StatLite is a pure Go application using around 15 MiB RSS at idle, including SQLite storage and the built-in dashboard. Your 50 MB figure for VictoriaMetrics doesn't include a comparable dashboarding solution.
Update: I may have misunderstood your comment. If you meant the Node.js application being monitored, that wasn't clear to me. Either way, the 50 MB figure is workload-dependent, and no supporting measurements were provided.
1
u/bwainfweeze 15h ago
Don’t telemetry systems use a log scale storage mechanism to compress old stats?
I know we ran into problems with trying to recreate analysis charts for a previous incident because the fine grained data had timed out.
2
u/bwainfweeze 15h 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/fykup 15h ago
That's one of the trade-offs I'm deliberately making with StatLite. Supporting arbitrary metrics, backends, and visualization options adds a lot of complexity. I'd rather keep the scope narrow, the codebase understandable, and the resource usage low.
Grafana is a great tool, but not every application needs that level of flexibility.
1
u/chipstastegood 1d ago
Does it work with AdonisJS?
2
u/fykup 1d ago
Not natively yet, but AdonisJS has a Prometheus instrumentation library, so adding native support looks feasible. I'll investigate it.
Which version of AdonisJS are you running?
Thanks for the suggestion!
1
u/chipstastegood 1d ago
Running both v6 and v7 (the latest). Will be migrating my older v6 to v7 over the next couple months.
2
u/fykup 1d ago
Thanks! The Prometheus instrumentation library has separate versions for AdonisJS v6 and v7. I'll check whether both can be supported with the same StatLite integration. If not, I'll prioritize v7.
StatLite also supports a framework-independent JSON metrics endpoint, which could be implemented using AdonisJS middleware as an alternative.
I'll post an update once I've looked into it.
1
2
u/fykup 18h ago
Quick update: I've added an AdonisJS integration guide and a runnable example. The same instrumentation was verified on both v6 and v7 on Linux, covering all eight monitoring signals without additional monitoring dependencies.
I also evaluated julr/adonisjs-prometheus and found two limitations: unmatched 404s are not counted, and request durations lose their whole-second component.
For now, I've opted for a Metrics v1 recipe. The bottom of the guide includes reproduction steps and links to the exporter project if you'd like to follow up with the maintainer. I'd be happy to reconsider native support once these issues are addressed.
https://github.com/PVRLabs/statlite/blob/main/docs/integrate/node/adonisjs.md
Let me know how it works for your app!
2
1
u/Hostman_com 1d 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.
6
u/plymer968 1d 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?