iobroker.beszel 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/auto-merge.yml +2 -0
- package/.github/dependabot.yml +12 -0
- package/.github/workflows/automerge-dependabot.yml +32 -0
- package/.github/workflows/test-and-release.yml +62 -0
- package/.vscode/settings.json +12 -0
- package/CHANGELOG.md +13 -0
- package/CLAUDE.md +91 -0
- package/LICENSE +21 -0
- package/README.md +187 -0
- package/admin/beszel.svg +9 -0
- package/admin/i18n/de/translations.json +43 -0
- package/admin/i18n/en/translations.json +43 -0
- package/admin/i18n/es/translations.json +43 -0
- package/admin/i18n/fr/translations.json +43 -0
- package/admin/i18n/it/translations.json +43 -0
- package/admin/i18n/nl/translations.json +43 -0
- package/admin/i18n/pl/translations.json +43 -0
- package/admin/i18n/pt/translations.json +43 -0
- package/admin/i18n/ru/translations.json +43 -0
- package/admin/i18n/uk/translations.json +43 -0
- package/admin/i18n/zh-cn/translations.json +43 -0
- package/admin/jsonConfig.json +240 -0
- package/build/lib/beszel-client.d.ts +39 -0
- package/build/lib/beszel-client.d.ts.map +1 -0
- package/build/lib/beszel-client.js +199 -0
- package/build/lib/state-manager.d.ts +47 -0
- package/build/lib/state-manager.d.ts.map +1 -0
- package/build/lib/state-manager.js +738 -0
- package/build/lib/types.d.ts +174 -0
- package/build/lib/types.d.ts.map +1 -0
- package/build/lib/types.js +2 -0
- package/build/main.d.ts +2 -0
- package/build/main.d.ts.map +1 -0
- package/build/main.js +191 -0
- package/eslint.config.mjs +36 -0
- package/io-package.json +162 -0
- package/package.json +61 -0
- package/scripts/version.js +28 -0
- package/src/lib/beszel-client.ts +216 -0
- package/src/lib/state-manager.ts +1050 -0
- package/src/lib/types.ts +192 -0
- package/src/main.ts +199 -0
- package/test/testPackageFiles.ts +5 -0
- package/tsconfig.build.json +7 -0
- package/tsconfig.json +24 -0
- package/tsconfig.test.json +9 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: Auto-merge Dependabot PRs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types: [opened, synchronize, reopened]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
pull-requests: write
|
|
9
|
+
contents: write
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
auto-merge:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
if: github.actor == 'dependabot[bot]'
|
|
15
|
+
steps:
|
|
16
|
+
- name: Fetch Dependabot metadata
|
|
17
|
+
id: metadata
|
|
18
|
+
uses: dependabot/fetch-metadata@v2
|
|
19
|
+
with:
|
|
20
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
21
|
+
|
|
22
|
+
- name: Approve PR
|
|
23
|
+
run: gh pr review --approve "$PR_URL"
|
|
24
|
+
env:
|
|
25
|
+
PR_URL: ${{ github.event.pull_request.html_url }}
|
|
26
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
27
|
+
|
|
28
|
+
- name: Enable auto-merge
|
|
29
|
+
run: gh pr merge --auto --squash "$PR_URL"
|
|
30
|
+
env:
|
|
31
|
+
PR_URL: ${{ github.event.pull_request.html_url }}
|
|
32
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
name: Test and Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
tags:
|
|
8
|
+
- v[0-9]+.[0-9]+.[0-9]+
|
|
9
|
+
- v[0-9]+.[0-9]+.[0-9]+-**
|
|
10
|
+
pull_request:
|
|
11
|
+
branches:
|
|
12
|
+
- main
|
|
13
|
+
|
|
14
|
+
concurrency:
|
|
15
|
+
group: ${{ github.ref }}
|
|
16
|
+
cancel-in-progress: true
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
check-and-lint:
|
|
20
|
+
if: contains(github.event.head_commit.message, '[skip ci]') == false
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@v4
|
|
24
|
+
- uses: ioBroker/testing-action-check@v1
|
|
25
|
+
with:
|
|
26
|
+
node-version: "20.x"
|
|
27
|
+
type-checking: true
|
|
28
|
+
lint: true
|
|
29
|
+
|
|
30
|
+
adapter-tests:
|
|
31
|
+
if: contains(github.event.head_commit.message, '[skip ci]') == false
|
|
32
|
+
needs: [check-and-lint]
|
|
33
|
+
runs-on: ${{ matrix.os }}
|
|
34
|
+
strategy:
|
|
35
|
+
matrix:
|
|
36
|
+
node-version: [20.x, 22.x, 24.x]
|
|
37
|
+
os: [ubuntu-latest]
|
|
38
|
+
steps:
|
|
39
|
+
- uses: actions/checkout@v4
|
|
40
|
+
- name: Run tests
|
|
41
|
+
uses: ioBroker/testing-action-adapter@v1
|
|
42
|
+
with:
|
|
43
|
+
node-version: ${{ matrix.node-version }}
|
|
44
|
+
os: ${{ matrix.os }}
|
|
45
|
+
|
|
46
|
+
deploy:
|
|
47
|
+
needs: [check-and-lint, adapter-tests]
|
|
48
|
+
if: |
|
|
49
|
+
contains(github.event.head_commit.message, '[skip ci]') == false &&
|
|
50
|
+
github.event_name == 'push' &&
|
|
51
|
+
startsWith(github.ref, 'refs/tags/v')
|
|
52
|
+
runs-on: ubuntu-latest
|
|
53
|
+
permissions:
|
|
54
|
+
contents: write
|
|
55
|
+
id-token: write
|
|
56
|
+
steps:
|
|
57
|
+
- uses: actions/checkout@v4
|
|
58
|
+
- uses: ioBroker/testing-action-deploy@v1
|
|
59
|
+
with:
|
|
60
|
+
node-version: "20.x"
|
|
61
|
+
npm-token: ${{ secrets.NPM_TOKEN }}
|
|
62
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"json.schemas": [
|
|
3
|
+
{
|
|
4
|
+
"fileMatch": ["io-package.json"],
|
|
5
|
+
"url": "https://raw.githubusercontent.com/ioBroker/ioBroker.js-controller/master/schemas/io-package.json"
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"fileMatch": ["admin/jsonConfig.json", "admin/jsonCustom.json", "admin/jsonTab.json"],
|
|
9
|
+
"url": "https://raw.githubusercontent.com/ioBroker/ioBroker.admin/master/packages/jsonConfig/schemas/jsonConfig.json"
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
}
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.0 (2026-03-17)
|
|
4
|
+
### Added
|
|
5
|
+
- Initial release
|
|
6
|
+
- Connect to Beszel Hub via PocketBase REST API
|
|
7
|
+
- Support for all system metrics: CPU, memory, disk, network, temperature, load average
|
|
8
|
+
- Optional metrics: GPU, containers (Docker/Podman), battery, extra filesystems, CPU breakdown
|
|
9
|
+
- Configurable poll interval (10–300 seconds)
|
|
10
|
+
- Token-based authentication with automatic refresh after 23 hours
|
|
11
|
+
- Automatic cleanup of removed systems and disabled metrics
|
|
12
|
+
- Full support for all 11 ioBroker languages
|
|
13
|
+
- Connection test button in admin UI
|
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# CLAUDE.md — ioBroker.beszel
|
|
2
|
+
|
|
3
|
+
## Project Overview
|
|
4
|
+
|
|
5
|
+
ioBroker adapter for [Beszel](https://github.com/henrygd/beszel) server monitoring.
|
|
6
|
+
|
|
7
|
+
- **Adapter name:** `beszel`
|
|
8
|
+
- **NPM package:** `iobroker.beszel`
|
|
9
|
+
- **GitHub:** `krobipd/ioBroker.beszel`
|
|
10
|
+
- **Version:** `0.1.0`
|
|
11
|
+
- **Author:** krobi <krobi@power-dreams.com>
|
|
12
|
+
- **Mode:** daemon (polling)
|
|
13
|
+
- **No extra runtime dependencies** — uses only `@iobroker/adapter-core` + Node.js built-in `http`/`https`
|
|
14
|
+
|
|
15
|
+
## Beszel API
|
|
16
|
+
|
|
17
|
+
### Base URL
|
|
18
|
+
User-configured (e.g. `http://192.168.1.100:8090`).
|
|
19
|
+
|
|
20
|
+
### Authentication
|
|
21
|
+
- `POST /api/collections/users/auth-with-password`
|
|
22
|
+
- Body: `{ identity, password }`
|
|
23
|
+
- Returns `{ token, record }`
|
|
24
|
+
- Token valid ~7 days; adapter refreshes after 23h or on 401
|
|
25
|
+
|
|
26
|
+
### Collections
|
|
27
|
+
| Endpoint | Purpose |
|
|
28
|
+
|----------|---------|
|
|
29
|
+
| `GET /api/collections/systems/records?perPage=200&sort=name` | All monitored systems |
|
|
30
|
+
| `GET /api/collections/system_stats/records?sort=-updated&perPage=200&filter=type%3D'1m'` | Latest 1-min stats per system |
|
|
31
|
+
| `GET /api/collections/containers/records?perPage=500&sort=system%2Cname` | Container metrics |
|
|
32
|
+
|
|
33
|
+
### Key fields
|
|
34
|
+
- `systems`: `id, name, status (up/down/paused/pending), host, info { u, v, sv, la, bat }`
|
|
35
|
+
- `system_stats`: `id, system (ref to systems.id), type, stats { cpu, mu, m, mp, mb, mz, su, s, du, d, dp, dr, dw, ns, nr, t, la, g, efs, bat, cpub, b }`
|
|
36
|
+
- `containers`: `id, system, name, status, health (0-3), cpu, memory, image`
|
|
37
|
+
|
|
38
|
+
## Source Files
|
|
39
|
+
|
|
40
|
+
| File | Purpose |
|
|
41
|
+
|------|---------|
|
|
42
|
+
| `src/main.ts` | Adapter class (lifecycle, polling, message handling) |
|
|
43
|
+
| `src/lib/types.ts` | TypeScript interfaces for Beszel API + adapter config |
|
|
44
|
+
| `src/lib/beszel-client.ts` | HTTP client (auth, systems, stats, containers) |
|
|
45
|
+
| `src/lib/state-manager.ts` | Create/update/cleanup ioBroker states |
|
|
46
|
+
|
|
47
|
+
## State Structure
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
beszel.0.
|
|
51
|
+
├── info.connection (bool, indicator.connected)
|
|
52
|
+
└── systems.{sanitized_name}/
|
|
53
|
+
├── online (bool, always)
|
|
54
|
+
├── status (string, always)
|
|
55
|
+
├── uptime / uptime_text (if metrics_uptime)
|
|
56
|
+
├── cpu_usage (if metrics_cpu)
|
|
57
|
+
├── load_avg_* (if metrics_loadAvg)
|
|
58
|
+
├── memory_* (if metrics_memory)
|
|
59
|
+
├── disk_* (if metrics_disk / metrics_diskSpeed)
|
|
60
|
+
├── network_* (if metrics_network)
|
|
61
|
+
├── temperature (if metrics_temperature — avg top 3 sensors)
|
|
62
|
+
├── temperatures/ (if metrics_temperatureDetails)
|
|
63
|
+
├── gpu/ (if metrics_gpu)
|
|
64
|
+
├── filesystems/ (if metrics_extraFs)
|
|
65
|
+
└── containers/ (if metrics_containers)
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Config Options (native)
|
|
69
|
+
|
|
70
|
+
All boolean metric flags default to `false` except:
|
|
71
|
+
`metrics_uptime`, `metrics_cpu`, `metrics_loadAvg`, `metrics_memory`, `metrics_disk`, `metrics_diskSpeed`, `metrics_network`, `metrics_temperature` — these default to `true`.
|
|
72
|
+
|
|
73
|
+
## Important Notes
|
|
74
|
+
|
|
75
|
+
1. `build/` is committed to git (`.gitignore` excludes only `build/test/`)
|
|
76
|
+
2. `encryptedNative`/`protectedNative` are on **root level** of `io-package.json`
|
|
77
|
+
3. Token is stored in memory only — never in ioBroker states
|
|
78
|
+
4. Load avg: prefer `stats.la`, fallback to `system.info.la`
|
|
79
|
+
5. Temperature: compute average of top 3 hottest sensors for `temperature` state
|
|
80
|
+
6. Name sanitization: lowercase, non-alphanumeric → `_`, max 50 chars, trim underscores
|
|
81
|
+
|
|
82
|
+
## Build Commands
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
npm run build # Full build (rm -rf build + tsc)
|
|
86
|
+
npm run build:test # Build for tests (includes test/ directory)
|
|
87
|
+
npm run check # TypeScript type check only (no emit)
|
|
88
|
+
npm run lint # ESLint
|
|
89
|
+
npm test # Build + run Mocha tests
|
|
90
|
+
npm run version:patch # Bump patch version + git tag
|
|
91
|
+
```
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 krobi <krobi@power-dreams.com>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
# ioBroker.beszel
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+

|
|
5
|
+

|
|
6
|
+

|
|
7
|
+
[](https://paypal.me/krobipd)
|
|
8
|
+

|
|
9
|
+

|
|
10
|
+
|
|
11
|
+
Connects to a [Beszel](https://github.com/henrygd/beszel) Hub and exposes server monitoring metrics for all registered systems as ioBroker states.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Features
|
|
16
|
+
|
|
17
|
+
- Fetches metrics from all systems registered in your Beszel Hub
|
|
18
|
+
- Per-system states: CPU, memory, disk, network, temperature, load average
|
|
19
|
+
- Optional: GPU metrics, Docker/Podman containers, battery, extra filesystems, CPU breakdown, systemd services
|
|
20
|
+
- Configurable poll interval (10–300 seconds)
|
|
21
|
+
- Automatic token refresh (every 23 hours) and re-authentication on 401
|
|
22
|
+
- Connection test button directly in the admin UI
|
|
23
|
+
- Automatic cleanup of states for removed systems and disabled metrics
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Requirements
|
|
28
|
+
|
|
29
|
+
- **Node.js >= 20**
|
|
30
|
+
- **ioBroker js-controller >= 7.0.0**
|
|
31
|
+
- **ioBroker Admin >= 7.6.20**
|
|
32
|
+
- A running [Beszel Hub](https://github.com/henrygd/beszel) with at least one registered system
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Installation
|
|
37
|
+
|
|
38
|
+
Install via the ioBroker Admin UI:
|
|
39
|
+
|
|
40
|
+
1. Open Admin → Adapters
|
|
41
|
+
2. Search for **Beszel**
|
|
42
|
+
3. Click Install
|
|
43
|
+
|
|
44
|
+
Or from GitHub (Expert Mode → Install from GitHub → `krobipd/ioBroker.beszel`).
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Configuration
|
|
49
|
+
|
|
50
|
+
### Connection
|
|
51
|
+
|
|
52
|
+
| Option | Description | Default |
|
|
53
|
+
|--------|-------------|---------|
|
|
54
|
+
| **Beszel Hub URL** | Full URL of your Beszel Hub (e.g. `http://192.168.1.100:8090`) | — |
|
|
55
|
+
| **Username** | Beszel Hub login email/username | — |
|
|
56
|
+
| **Password** | Beszel Hub password | — |
|
|
57
|
+
| **Poll Interval (s)** | How often to fetch data from the Hub | `60` |
|
|
58
|
+
|
|
59
|
+
Use the **Test Connection** button to verify your credentials before saving.
|
|
60
|
+
|
|
61
|
+
### Metrics
|
|
62
|
+
|
|
63
|
+
All metrics are global toggles that apply to **all** systems. Disabled metrics are automatically removed from the state tree on the next adapter start.
|
|
64
|
+
|
|
65
|
+
| Group | Metric | Default |
|
|
66
|
+
|-------|--------|---------|
|
|
67
|
+
| **System** | Uptime | on |
|
|
68
|
+
| | Agent Version | off |
|
|
69
|
+
| | Systemd Services (total / failed) | off |
|
|
70
|
+
| **CPU** | CPU Usage (%) | on |
|
|
71
|
+
| | Load Average (1m / 5m / 15m) | on |
|
|
72
|
+
| | CPU Breakdown (User / System / IOWait / Idle) | off |
|
|
73
|
+
| **Memory** | Memory Usage (% and GB) | on |
|
|
74
|
+
| | Memory Details (Buffers, ZFS ARC) | off |
|
|
75
|
+
| | Swap | off |
|
|
76
|
+
| **Disk** | Disk Usage (% and GB) | on |
|
|
77
|
+
| | Disk Read/Write Speed | on |
|
|
78
|
+
| | Additional Filesystems | off |
|
|
79
|
+
| **Network** | Network Traffic (Upload / Download MB/s) | on |
|
|
80
|
+
| **Temperature** | Temperature (hottest sensors avg) | on |
|
|
81
|
+
| | Individual Temperature Sensors | off |
|
|
82
|
+
| **GPU** | GPU Metrics (Usage, Memory, Power) | off |
|
|
83
|
+
| **Containers** | Container Monitoring (Docker / Podman) | off |
|
|
84
|
+
| **Battery** | Battery Status | off |
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## State Tree
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
beszel.0.
|
|
92
|
+
├── info.connection — Connection status (bool)
|
|
93
|
+
└── systems.
|
|
94
|
+
└── {system_name}/ — Device (sanitized name)
|
|
95
|
+
├── online — Is system up? (bool)
|
|
96
|
+
├── status — Status string (up/down/paused/pending)
|
|
97
|
+
├── uptime — Uptime in seconds
|
|
98
|
+
├── uptime_text — Human-readable uptime (e.g. "14d 6h")
|
|
99
|
+
├── cpu_usage — CPU %
|
|
100
|
+
├── memory_percent — RAM %
|
|
101
|
+
├── memory_used — RAM used (GB)
|
|
102
|
+
├── disk_percent — Disk %
|
|
103
|
+
├── network_sent — Upload (MB/s)
|
|
104
|
+
├── network_recv — Download (MB/s)
|
|
105
|
+
├── temperature — Avg temperature (°C)
|
|
106
|
+
├── temperatures/ — Individual sensors (if enabled)
|
|
107
|
+
├── gpu/ — GPU metrics (if enabled)
|
|
108
|
+
├── filesystems/ — Extra filesystems (if enabled)
|
|
109
|
+
└── containers/ — Container metrics (if enabled)
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## Troubleshooting
|
|
115
|
+
|
|
116
|
+
### Connection failed
|
|
117
|
+
- Verify the Hub URL is reachable from the ioBroker host
|
|
118
|
+
- Check username and password (use the Test Connection button)
|
|
119
|
+
- Check that no firewall blocks access to the Beszel Hub port
|
|
120
|
+
|
|
121
|
+
### States not updating
|
|
122
|
+
- Check the ioBroker log for errors from the `beszel` adapter
|
|
123
|
+
- Ensure the poll interval is not too short (minimum 10 seconds)
|
|
124
|
+
- Check `info.connection` state — if `false`, authentication failed
|
|
125
|
+
|
|
126
|
+
### Missing states for a system
|
|
127
|
+
- The system may be `down` or `paused` in Beszel — no stats records exist yet
|
|
128
|
+
- Verify the metric is enabled in the adapter configuration
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## Development
|
|
133
|
+
|
|
134
|
+
The adapter is fully written in **TypeScript** with `strict` mode. No extra runtime dependencies — the Beszel API client uses only Node.js built-in `http`/`https` modules.
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
npm run build # Build
|
|
138
|
+
npm test # Tests
|
|
139
|
+
npm run lint # Lint
|
|
140
|
+
npm run watch # Watch mode
|
|
141
|
+
npm run check # TypeScript type check only
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Project Structure
|
|
145
|
+
|
|
146
|
+
```
|
|
147
|
+
src/
|
|
148
|
+
├── main.ts # Adapter main class
|
|
149
|
+
└── lib/
|
|
150
|
+
├── types.ts # TypeScript interfaces
|
|
151
|
+
├── beszel-client.ts # Beszel API HTTP client
|
|
152
|
+
└── state-manager.ts # ioBroker state management
|
|
153
|
+
test/
|
|
154
|
+
└── testPackageFiles.ts # Package validation tests
|
|
155
|
+
build/ # Compiled JavaScript (committed to git)
|
|
156
|
+
admin/
|
|
157
|
+
├── jsonConfig.json # Admin UI schema
|
|
158
|
+
├── beszel.svg # Adapter icon
|
|
159
|
+
└── i18n/ # Translations (11 languages)
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## Changelog
|
|
165
|
+
|
|
166
|
+
See [CHANGELOG.md](CHANGELOG.md).
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## Support
|
|
171
|
+
|
|
172
|
+
- [ioBroker Forum](https://forum.iobroker.net/)
|
|
173
|
+
- [GitHub Issues](https://github.com/krobipd/iobroker.beszel/issues)
|
|
174
|
+
|
|
175
|
+
If this adapter is useful to you, consider a small donation:
|
|
176
|
+
|
|
177
|
+
[](https://paypal.me/krobipd)
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## License
|
|
182
|
+
|
|
183
|
+
MIT License — see [LICENSE](LICENSE)
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
*Developed with support from Claude.ai*
|
package/admin/beszel.svg
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 56 70">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="gradient" x1="0%" y1="20%" x2="100%" y2="120%">
|
|
4
|
+
<stop offset="0%" style="stop-color:#747bff"/>
|
|
5
|
+
<stop offset="100%" style="stop-color:#24eb5c"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
</defs>
|
|
8
|
+
<path fill="url(#gradient)" d="M35 70H0V0h35q4.4 0 8.2 1.7a21.4 21.4 0 0 1 6.6 4.5q2.9 2.8 4.5 6.6Q56 16.7 56 21a15.4 15.4 0 0 1-.3 3.2 17.6 17.6 0 0 1-.2.8 19.4 19.4 0 0 1-1.5 4 17 17 0 0 1-2.4 3.4 13.5 13.5 0 0 1-2.6 2.3 12.5 12.5 0 0 1-.4.3q1.7 1 3 2.5Q53 39.1 54 41a18.3 18.3 0 0 1 1.5 4 17.4 17.4 0 0 1 .5 3 15.3 15.3 0 0 1 0 1q0 4.4-1.7 8.2a21.4 21.4 0 0 1-4.5 6.6q-2.8 2.9-6.6 4.6Q39.4 70 35 70ZM14 14v14h21a7 7 0 0 0 2.3-.3 6.6 6.6 0 0 0 .4-.2Q39 27 40 26a6.9 6.9 0 0 0 1.5-2.2q.5-1.3.5-2.8a7 7 0 0 0-.4-2.3 6.6 6.6 0 0 0-.1-.4Q40.9 17 40 16a7 7 0 0 0-2.3-1.4 6.9 6.9 0 0 0-2.5-.6 7.9 7.9 0 0 0-.2 0H14Zm0 28v14h21a7 7 0 0 0 2.3-.4 6.6 6.6 0 0 0 .4-.1Q39 54.9 40 54a7 7 0 0 0 1.5-2.2 6.9 6.9 0 0 0 .5-2.6 7.9 7.9 0 0 0 0-.2 7 7 0 0 0-.4-2.3 6.6 6.6 0 0 0-.1-.4Q40.9 45 40 44a7 7 0 0 0-2.3-1.5 6.9 6.9 0 0 0-2.5-.6 7.9 7.9 0 0 0-.2 0H14Z"/>
|
|
9
|
+
</svg>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"tab_connection": "Verbindung",
|
|
3
|
+
"tab_metrics": "Metriken",
|
|
4
|
+
|
|
5
|
+
"label_url": "Beszel Hub URL",
|
|
6
|
+
"help_url": "URL des Beszel Hubs (z.B. http://192.168.1.100:8090)",
|
|
7
|
+
"label_username": "Benutzername",
|
|
8
|
+
"label_password": "Passwort",
|
|
9
|
+
"label_pollInterval": "Abfrageintervall (s)",
|
|
10
|
+
"help_pollInterval": "Wie oft Daten vom Beszel Hub abgerufen werden (10–300 Sekunden)",
|
|
11
|
+
"btn_checkConnection": "Verbindung testen",
|
|
12
|
+
"msg_connectionOk": "Verbindung erfolgreich",
|
|
13
|
+
"msg_connectionFailed": "Verbindung fehlgeschlagen",
|
|
14
|
+
|
|
15
|
+
"header_system": "System",
|
|
16
|
+
"header_cpu": "CPU",
|
|
17
|
+
"header_memory": "Arbeitsspeicher",
|
|
18
|
+
"header_disk": "Festplatte",
|
|
19
|
+
"header_network": "Netzwerk",
|
|
20
|
+
"header_temperature": "Temperatur",
|
|
21
|
+
"header_gpu": "GPU",
|
|
22
|
+
"header_containers": "Container",
|
|
23
|
+
"header_battery": "Akku",
|
|
24
|
+
|
|
25
|
+
"metric_uptime": "Betriebszeit",
|
|
26
|
+
"metric_agentVersion": "Agent-Version",
|
|
27
|
+
"metric_services": "Systemd-Dienste (gesamt / fehlgeschlagen)",
|
|
28
|
+
"metric_cpu": "CPU-Auslastung (%)",
|
|
29
|
+
"metric_loadAvg": "Lastdurchschnitt (1m / 5m / 15m)",
|
|
30
|
+
"metric_cpuBreakdown": "CPU-Aufschlüsselung (User / System / IOWait / Idle)",
|
|
31
|
+
"metric_memory": "Speicherauslastung (% und GB)",
|
|
32
|
+
"metric_memoryDetails": "Speicherdetails (Puffer, ZFS ARC)",
|
|
33
|
+
"metric_swap": "Auslagerungsspeicher",
|
|
34
|
+
"metric_disk": "Festplattenauslastung (% und GB)",
|
|
35
|
+
"metric_diskSpeed": "Festplatten Lese-/Schreibgeschwindigkeit",
|
|
36
|
+
"metric_extraFs": "Weitere Dateisysteme",
|
|
37
|
+
"metric_network": "Netzwerkverkehr (Upload / Download MB/s)",
|
|
38
|
+
"metric_temperature": "Temperatur (Durchschnitt der heißesten Sensoren)",
|
|
39
|
+
"metric_temperatureDetails": "Einzelne Temperatursensoren",
|
|
40
|
+
"metric_gpu": "GPU-Metriken (Auslastung, Speicher, Leistung)",
|
|
41
|
+
"metric_containers": "Container-Überwachung (Docker / Podman)",
|
|
42
|
+
"metric_battery": "Akkustatus"
|
|
43
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"tab_connection": "Connection",
|
|
3
|
+
"tab_metrics": "Metrics",
|
|
4
|
+
|
|
5
|
+
"label_url": "Beszel Hub URL",
|
|
6
|
+
"help_url": "URL of your Beszel Hub (e.g. http://192.168.1.100:8090)",
|
|
7
|
+
"label_username": "Username",
|
|
8
|
+
"label_password": "Password",
|
|
9
|
+
"label_pollInterval": "Poll Interval (s)",
|
|
10
|
+
"help_pollInterval": "How often to fetch data from Beszel Hub (10–300 seconds)",
|
|
11
|
+
"btn_checkConnection": "Test Connection",
|
|
12
|
+
"msg_connectionOk": "Connection successful",
|
|
13
|
+
"msg_connectionFailed": "Connection failed",
|
|
14
|
+
|
|
15
|
+
"header_system": "System",
|
|
16
|
+
"header_cpu": "CPU",
|
|
17
|
+
"header_memory": "Memory",
|
|
18
|
+
"header_disk": "Disk",
|
|
19
|
+
"header_network": "Network",
|
|
20
|
+
"header_temperature": "Temperature",
|
|
21
|
+
"header_gpu": "GPU",
|
|
22
|
+
"header_containers": "Containers",
|
|
23
|
+
"header_battery": "Battery",
|
|
24
|
+
|
|
25
|
+
"metric_uptime": "Uptime",
|
|
26
|
+
"metric_agentVersion": "Agent Version",
|
|
27
|
+
"metric_services": "Systemd Services (total / failed)",
|
|
28
|
+
"metric_cpu": "CPU Usage (%)",
|
|
29
|
+
"metric_loadAvg": "Load Average (1m / 5m / 15m)",
|
|
30
|
+
"metric_cpuBreakdown": "CPU Breakdown (User / System / IOWait / Idle)",
|
|
31
|
+
"metric_memory": "Memory Usage (% and GB)",
|
|
32
|
+
"metric_memoryDetails": "Memory Details (Buffers, ZFS ARC)",
|
|
33
|
+
"metric_swap": "Swap",
|
|
34
|
+
"metric_disk": "Disk Usage (% and GB)",
|
|
35
|
+
"metric_diskSpeed": "Disk Read/Write Speed",
|
|
36
|
+
"metric_extraFs": "Additional Filesystems",
|
|
37
|
+
"metric_network": "Network Traffic (Upload / Download MB/s)",
|
|
38
|
+
"metric_temperature": "Temperature (hottest sensors avg)",
|
|
39
|
+
"metric_temperatureDetails": "Individual Temperature Sensors",
|
|
40
|
+
"metric_gpu": "GPU Metrics (Usage, Memory, Power)",
|
|
41
|
+
"metric_containers": "Container Monitoring (Docker / Podman)",
|
|
42
|
+
"metric_battery": "Battery Status"
|
|
43
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"tab_connection": "Conexión",
|
|
3
|
+
"tab_metrics": "Métricas",
|
|
4
|
+
|
|
5
|
+
"label_url": "URL de Beszel Hub",
|
|
6
|
+
"help_url": "URL de su Beszel Hub (p. ej. http://192.168.1.100:8090)",
|
|
7
|
+
"label_username": "Nombre de usuario",
|
|
8
|
+
"label_password": "Contraseña",
|
|
9
|
+
"label_pollInterval": "Intervalo de sondeo (s)",
|
|
10
|
+
"help_pollInterval": "Con qué frecuencia obtener datos del Beszel Hub (10–300 segundos)",
|
|
11
|
+
"btn_checkConnection": "Probar conexión",
|
|
12
|
+
"msg_connectionOk": "Conexión exitosa",
|
|
13
|
+
"msg_connectionFailed": "Error de conexión",
|
|
14
|
+
|
|
15
|
+
"header_system": "Sistema",
|
|
16
|
+
"header_cpu": "CPU",
|
|
17
|
+
"header_memory": "Memoria",
|
|
18
|
+
"header_disk": "Disco",
|
|
19
|
+
"header_network": "Red",
|
|
20
|
+
"header_temperature": "Temperatura",
|
|
21
|
+
"header_gpu": "GPU",
|
|
22
|
+
"header_containers": "Contenedores",
|
|
23
|
+
"header_battery": "Batería",
|
|
24
|
+
|
|
25
|
+
"metric_uptime": "Tiempo de actividad",
|
|
26
|
+
"metric_agentVersion": "Versión del agente",
|
|
27
|
+
"metric_services": "Servicios Systemd (total / fallidos)",
|
|
28
|
+
"metric_cpu": "Uso de CPU (%)",
|
|
29
|
+
"metric_loadAvg": "Carga promedio (1m / 5m / 15m)",
|
|
30
|
+
"metric_cpuBreakdown": "Desglose de CPU (usuario / sistema / IOWait / inactivo)",
|
|
31
|
+
"metric_memory": "Uso de memoria (% y GB)",
|
|
32
|
+
"metric_memoryDetails": "Detalles de memoria (búferes, ZFS ARC)",
|
|
33
|
+
"metric_swap": "Memoria de intercambio",
|
|
34
|
+
"metric_disk": "Uso de disco (% y GB)",
|
|
35
|
+
"metric_diskSpeed": "Velocidad de lectura/escritura del disco",
|
|
36
|
+
"metric_extraFs": "Sistemas de archivos adicionales",
|
|
37
|
+
"metric_network": "Tráfico de red (subida / bajada MB/s)",
|
|
38
|
+
"metric_temperature": "Temperatura (promedio de los sensores más calientes)",
|
|
39
|
+
"metric_temperatureDetails": "Sensores de temperatura individuales",
|
|
40
|
+
"metric_gpu": "Métricas GPU (uso, memoria, potencia)",
|
|
41
|
+
"metric_containers": "Monitorización de contenedores (Docker / Podman)",
|
|
42
|
+
"metric_battery": "Estado de la batería"
|
|
43
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"tab_connection": "Connexion",
|
|
3
|
+
"tab_metrics": "Métriques",
|
|
4
|
+
|
|
5
|
+
"label_url": "URL du Beszel Hub",
|
|
6
|
+
"help_url": "URL de votre Beszel Hub (ex. http://192.168.1.100:8090)",
|
|
7
|
+
"label_username": "Nom d'utilisateur",
|
|
8
|
+
"label_password": "Mot de passe",
|
|
9
|
+
"label_pollInterval": "Intervalle d'interrogation (s)",
|
|
10
|
+
"help_pollInterval": "Fréquence de récupération des données depuis Beszel Hub (10–300 secondes)",
|
|
11
|
+
"btn_checkConnection": "Tester la connexion",
|
|
12
|
+
"msg_connectionOk": "Connexion réussie",
|
|
13
|
+
"msg_connectionFailed": "Échec de la connexion",
|
|
14
|
+
|
|
15
|
+
"header_system": "Système",
|
|
16
|
+
"header_cpu": "CPU",
|
|
17
|
+
"header_memory": "Mémoire",
|
|
18
|
+
"header_disk": "Disque",
|
|
19
|
+
"header_network": "Réseau",
|
|
20
|
+
"header_temperature": "Température",
|
|
21
|
+
"header_gpu": "GPU",
|
|
22
|
+
"header_containers": "Conteneurs",
|
|
23
|
+
"header_battery": "Batterie",
|
|
24
|
+
|
|
25
|
+
"metric_uptime": "Temps de fonctionnement",
|
|
26
|
+
"metric_agentVersion": "Version de l'agent",
|
|
27
|
+
"metric_services": "Services Systemd (total / échoués)",
|
|
28
|
+
"metric_cpu": "Utilisation CPU (%)",
|
|
29
|
+
"metric_loadAvg": "Charge moyenne (1m / 5m / 15m)",
|
|
30
|
+
"metric_cpuBreakdown": "Détail CPU (utilisateur / système / IOWait / inactif)",
|
|
31
|
+
"metric_memory": "Utilisation mémoire (% et Go)",
|
|
32
|
+
"metric_memoryDetails": "Détails mémoire (tampons, ZFS ARC)",
|
|
33
|
+
"metric_swap": "Mémoire d'échange",
|
|
34
|
+
"metric_disk": "Utilisation disque (% et Go)",
|
|
35
|
+
"metric_diskSpeed": "Vitesse lecture/écriture disque",
|
|
36
|
+
"metric_extraFs": "Systèmes de fichiers supplémentaires",
|
|
37
|
+
"metric_network": "Trafic réseau (envoi / réception Mo/s)",
|
|
38
|
+
"metric_temperature": "Température (moyenne des capteurs les plus chauds)",
|
|
39
|
+
"metric_temperatureDetails": "Capteurs de température individuels",
|
|
40
|
+
"metric_gpu": "Métriques GPU (usage, mémoire, puissance)",
|
|
41
|
+
"metric_containers": "Surveillance des conteneurs (Docker / Podman)",
|
|
42
|
+
"metric_battery": "État de la batterie"
|
|
43
|
+
}
|