diff --git a/agent/docker-compose.yml b/agent/docker-compose.yml index 263dff3..54b1cb8 100644 --- a/agent/docker-compose.yml +++ b/agent/docker-compose.yml @@ -1,11 +1,11 @@ services: - agent: - image: 'henrygd/qoma-agent' - container_name: 'qoma-agent' + beszel-agent: + image: 'henrygd/beszel-agent' + container_name: 'beszel-agent' restart: unless-stopped - ports: - - '45876:45876' + network_mode: host volumes: - /var/run/docker.sock:/var/run/docker.sock environment: + - FILESYSTEM=/dev/sda1 # Set to the correct filesystem for disk I/O stats - KEY="ssh-ed25519 YOUR_PUBLIC_KEY" diff --git a/hub/docker-compose.yml b/hub/docker-compose.yml new file mode 100644 index 0000000..88e79aa --- /dev/null +++ b/hub/docker-compose.yml @@ -0,0 +1,9 @@ +services: + beszel: + image: 'henrygd/beszel' + container_name: 'beszel' + restart: unless-stopped + ports: + - '127.0.0.1:8090:8090' + volumes: + - ./beszel_data:/beszel_data diff --git a/readme.md b/readme.md index 9cbe92c..71caa28 100644 --- a/readme.md +++ b/readme.md @@ -1,4 +1,4 @@ -# Beszel +# Beszel \*WIP\* A lightweight server resource monitoring hub with historical data, docker stats, and alerts. @@ -11,7 +11,7 @@ A lightweight server resource monitoring hub with historical data, docker stats, --> -## Features + ## Introduction @@ -38,10 +38,36 @@ The hub and agent are distributed as single binary files, as well as docker imag ### Docker -> **Note**: The docker version cannot automatically detect the filesystem to use for disk I/O stats, so use the binary version if that's important to you. +**Hub**: See the example [docker-compose.yml](/hub/docker-compose.yml) file. + +**Agent**: The hub provides compose content when adding a system to monitor, but you can also reference the example [docker-compose.yml](/agent/docker-compose.yml) file. + +The agent uses the `host` network mode, which automatically exposes the port. So change the port using an environment variable if you need to. It's set up this way so that can access stats for your host network interfaces. + +If you don't want to use the host network, you may remove that line from the compose file and manually expose the port. This will prevent the network stats from populating. + +> **Note**: The docker version of the agent cannot automatically detect the filesystem to use for disk I/O stats, so include the `FILESYSTEM` environment variable if you want that to work ([instructions here](#finding-the-correct-filesystem)). ### Binary +Download and run the latest binaries from the [releases page](https://github.com/henrygd/beszel/releases) or use the commands below. + +#### Hub: + +```bash +curl -sL "https://github.com/henrygd/beszel/releases/latest/download/beszel_$(uname -s)_$(uname -m | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/').tar.gz" | tar -xz -O beszel | tee ./beszel >/dev/null && chmod +x beszel && ls beszel +``` + +#### Agent: + +```bash +curl -sL "https://github.com/henrygd/beszel/releases/latest/download/beszel-agent_$(uname -s)_$(uname -m | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/').tar.gz" | tar -xz -O beszel-agent | tee ./beszel-agent >/dev/null && chmod +x beszel-agent && ls beszel-agent +``` + +#### Updating + +Use `beszel update` and `beszel-agent update` to update to the latest version. + ## Environment Variables ### Hub @@ -59,7 +85,7 @@ The hub and agent are distributed as single binary files, as well as docker imag ## OAuth / OIDC setup -Beszel supports OpenID Connect and many OAuth2 authentication providers (see list below). To enable this, you will need to: +Beszel supports OpenID Connect and many OAuth2 authentication providers (see list below). To enable, do the following: 1. Create an OAuth2 application using your provider of choice. The redirect / callback URL should be `/api/oauth2-redirect`. 2. When you have the client ID and secret, go to the "Auth providers" page and enable your provider.