Replies: 5 comments 3 replies
|
Great ideas, thanks! I haven't used it in a very long time, but this sounds a bit like how Prometheus works with third party exporters. I've been meaning to look further into this because they're standardizing their OpenMetrics spec and it would be cool if we could support at least a subset of it and be compatible with some of the existing exporters. But this would likely require more work than using our own basic spec. Quick thoughts: Instead of plugins connecting directly to the hub, maybe they connect and register themselves with the local agent instead. Then the agent grabs metrics from them when necessary and includes it in the larger payload. To avoid plugin developers needing to create front-end charts, maybe we use a standard interface to specify the chart type and other details. We can also add more chart types. I'll try to think more about it this weekend and let you know if I come up with any other ideas. |
|
I like the direction discussed here, and I think it overlaps with something I had in mind. What is described in this thread makes a lot of sense as a technical foundation for plugin-based monitoring without making the core project heavier. The part I was imagining is not really a different direction, but more how something like this could maybe evolve on the user and distribution side over time. For example, if Beszel ever moves further in that modular direction, I could imagine things like
The other part I had in mind was the agent side. Because Beszel aims to stay lightweight, I think it could be interesting one day to support custom agent builds with only the modules needed for a specific machine. For example, a Proxmox host would not necessarily need the same modules as a Kubernetes node. This reminds me a little bit of Caddy with I could imagine this being exposed in the frontend with a page where users can
The add host flow could maybe integrate with that later as well, so the UI could let users select one of those custom builds and automatically update the installation command accordingly. |
|
I've been looking at how LibreNMS and Netdata handle SNMP and maybe there is a middle ground that allows to start small but grow into this plugin system. The plugin system makes sense for new metric categories that need new UI (Redis, HAProxy, Traefik). But there's a category of devices that report the same metrics Beszel already displays: network equipment, IPMI hosts, NAS devices etc. These just need CPU, memory, disk, network and temperature. For those, the simpler path is abstracting the collection layer in the agent rather than the display layer in the hub. A provider interface that feeds into the existing Stats struct with local providers:
- type: snmp
address: 192.168.1.1
community: public
- type: ipmi
address: 192.168.1.5
username: admin
password: secretStandard MIBs ( It might be a good starting point for now and it could complement the plugin system proposed here. |
|
Just to add to the benefits of this proposal:
|
|
I have another use case for this proposal: monitoring the mail queue. On my mail servers, the metric I actually need to alert on is the Postfix queue depth ( This fits the plugin model: a single integer metric, inexpensive to collect, one chart, and a threshold alert. A thought on the approach suggested by @henrygd (plugins registering with the local agent rather than the hub): this would work very well here, since the collector is just a shell command or a directory count on the same machine. |
Uh oh!
There was an error while loading. Please reload this page.
Component
Hub & Agent
Description
After suggestions for monitoring HAProxy #1546 and Internet performance #1079, I've been thinking about how we could support custom monitoring without adding load to the main project.
Proposal
Create a plugin agent template that third parties can use to build custom monitoring agents (Redis, PostgreSQL, HAProxy, Traefik , etc.) that integrate with Beszel.
How it works
Collectorinterface (Or a Go module?)plugin_statscollection - Stores plugin data linked to parent systemDeveloper experience
Plugin metrics appear in a dedicated section on the parent system's page.
Hub Changes
New
plugin_statscollectionBackend modifications
X-Plugin-Typeheader, validate against parent system's tokenplugin_statscollection (notsystem_stats)plugin_statsAll reactions