mirror of
https://forgejo.altau.su/lego/lego-monitoring.git
synced 2026-03-10 04:41:10 +00:00
write a readme
This commit is contained in:
parent
8b18d407d7
commit
4558cf9e6f
7 changed files with 116 additions and 4 deletions
67
README.md
67
README.md
|
|
@ -0,0 +1,67 @@
|
|||
# lego-monitoring
|
||||
|
||||
Simple system monitoring service. Sends alerts in Telegram. Currently supports monitoring:
|
||||
* CPU/RAM/network usage
|
||||
* temperature readings
|
||||
* [vulnix](https://github.com/nix-community/vulnix) readings (NixOS only)
|
||||
|
||||
## Setup
|
||||
|
||||
### NixOS
|
||||
|
||||
Only flake-based setups are supported.
|
||||
|
||||
Include the module in your `flake.nix`:
|
||||
|
||||
```nix
|
||||
{
|
||||
inputs = {
|
||||
# ... your other inputs ...
|
||||
lego-monitoring = {
|
||||
url = "git+https://gitlab.altau.su/lego/lego-monitoring.git";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = {
|
||||
nixpkgs,
|
||||
lego-monitoring,
|
||||
...
|
||||
}: {
|
||||
# change `yourhostname` to your actual hostname
|
||||
nixosConfigurations.yourhostname = nixpkgs.lib.nixosSystem {
|
||||
# change to your system:
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
lego-monitoring.nixosModules.default
|
||||
./configuration.nix
|
||||
# ... your other modules ...
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
See [docs/nixos-options.md](docs/nixos-options.md) for available configuration options.
|
||||
|
||||
### Non-NixOS
|
||||
|
||||
Requires [uv](https://github.com/astral-sh/uv), systemd.
|
||||
|
||||
```bash
|
||||
cd /opt
|
||||
git clone https://gitlab.altau.su/lego/lego-monitoring.git
|
||||
cd lego-monitoring
|
||||
uv sync
|
||||
cp config.example.json config.json
|
||||
```
|
||||
|
||||
Edit `config.json` to suit your usage scenario. The default configuration only sends alerts on service's start and stop.
|
||||
You may refer to the NixOS option documentation, as its options are the same, except JSON uses snake_case instead of lowerCamelCase.
|
||||
|
||||
Then enable and start the service:
|
||||
|
||||
```bash
|
||||
ln -s /opt/lego-monitoring/lego-monitoring.service /etc/systemd/system/lego-monitoring.service
|
||||
systemctl enable --now lego-monitoring
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue