Files
nasmon/README.md
T
a.gritsenkoandClaude Opus 5.5 42cfb43e2e
build / build (push) Successful in 1m5s
Remove the RepoISO integration; keep generic support for shares of other services
RepoISO now manages the NAS itself, so nasmon no longer polls it (settings field, dashboard card,
menu link and repoiso:* alerts are gone). Drop-in SMB includes, read-only listing and keeping
smbd/nfs-server running for other software's shares stay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 19:05:16 +03:00

75 lines
2.9 KiB
Markdown

# nasmon
Lightweight NAS health monitor written in Go. Web dashboard (CPU, memory
incl. ZFS ARC, temperatures, physical disks with SMART, ZFS pools and
datasets) with periodic SMART/ZFS checks and e-mail alerts, plus SMB/NFS
share management from the UI.
* Web UI: `http://<host>:8090`
* Settings: `http://<host>:8090/settings` (also `/etc/nasmon/config.json`)
* State: `/var/lib/nasmon/nasmon.db` (SMART history, alert log)
* Service: `systemctl status nasmon` / `journalctl -u nasmon -f`
* JSON API: `/api/status`, `/api/history?hours=24`, `/api/disks/<serial>/history?days=30`
Shares of other software on the same host (`/etc/samba/smb.conf.d/*.conf`,
`/etc/exports.d/*.exports`) are included into the generated config, listed
read-only and keep smbd / nfs-server running.
No authentication — designed for a LAN-only NAS (the `/shares` page can
create SMB/NFS users and exports, so keep it off the public internet).
See [packaging/README.md](packaging/README.md) for the full operational
doc (ZFS dataset management, SMB/NFS shares, alert lifecycle) — it ships
inside the package as `/usr/share/doc/nasmon/README.md`.
## Build
Go 1.22, [nfpm](https://nfpm.goreleaser.com/) (no `rpmbuild`/`dpkg-deb`
needed — nfpm builds both formats natively).
```powershell
# Windows
.\build.ps1 # dist\nasmon_<version>_amd64.deb + dist\nasmon-<version>.x86_64.rpm
.\build.ps1 -Test # go vet + go test first
.\build.ps1 -Version 0.2.0
```
```bash
# Linux/WSL/CI
./build.sh
TEST=1 ./build.sh
VERSION=0.2.0 ./build.sh
```
One-time tool setup:
```
go install github.com/goreleaser/nfpm/v2/cmd/nfpm@latest
```
## Packaging
`packaging/nfpm.yaml` builds both formats from one spec:
- **.deb** (Ubuntu/Debian): depends on `smartmontools`, `zfsutils-linux`, `util-linux`;
recommends `samba`, `nfs-kernel-server`, `wsdd` for the `/shares` page.
- **.rpm** (Fedora/RHEL/Rocky, `dnf`): depends on `smartmontools`, `util-linux`;
recommends `samba`, `nfs-utils`, `wsdd`. ZFS is **not** a hard dependency on
rpm — RHEL-family distros have no native ZFS package; install the
[OpenZFS](https://openzfs.github.io/openzfs-docs/Getting%20Started/RHEL-based%20distro/index.html)
repo yourself if you need the `/zfs` page's pool/dataset features.
Both formats install the same systemd unit (`packaging/nasmon.service`, run
as root — it needs `smartctl`/`zpool`), just at their respective conventional
paths (`/lib/systemd/system` on deb, `/usr/lib/systemd/system` on rpm), plus
the bundled `wsdd.service` unit (Ubuntu/Fedora `wsdd` packages ship no unit
of their own), default config at `/etc/nasmon/config.json`, and
`postinst.sh`/`prerm.sh`/`postrm.sh` maintainer scripts (written to run
correctly under both dpkg and rpm argument conventions).
## CI
`.gitea/workflows/build.yml` runs `go vet`/`go test` and builds both
packages on every push, uploading `dist/*.deb` and `dist/*.rpm` as build
artifacts.