[GH-ISSUE #368] Feat: Beszel integration - Install beszel-agent for monitoring & metrics #235

Closed
opened 2026-03-03 11:14:13 +03:00 by kerem · 1 comment
Owner

Originally created by @pavanbhaskardev on GitHub (Jul 28, 2025).
Original GitHub issue: https://github.com/dflow-sh/dflow/issues/368

Originally assigned to: @pavanbhaskardev, @manikanta9176 on GitHub.

Integrate Beszel by installing the beszel-agent on the production server and customer machines. This will enable proper monitoring and metrics collection for the deployment.

Tasks:

  • Install beszel-agent on the production server
  • Deploy beszel-agent to all customer machines
  • Ensure agent is running and collecting metrics
  • Verify integration with monitoring dashboard

This will improve visibility into system health and performance.

Originally created by @pavanbhaskardev on GitHub (Jul 28, 2025). Original GitHub issue: https://github.com/dflow-sh/dflow/issues/368 Originally assigned to: @pavanbhaskardev, @manikanta9176 on GitHub. Integrate Beszel by installing the beszel-agent on the production server and customer machines. This will enable proper monitoring and metrics collection for the deployment. **Tasks:** - Install beszel-agent on the production server - Deploy beszel-agent to all customer machines - Ensure agent is running and collecting metrics - Verify integration with monitoring dashboard This will improve visibility into system health and performance.
kerem 2026-03-03 11:14:13 +03:00
Author
Owner

@pavanbhaskardev commented on GitHub (Jul 28, 2025):

Installed beszel on production instance, attached production, proxy server

here're steps for adding customer machines to beszel instance

Step 1: (customer account creation)

import PocketBase from 'pocketbase';
const pb = new PocketBase('https://monitoring.something.com);

// login as super-admin user
await pb
  .collection('_superusers')
  .authWithPassword('admin@example.com', 'password');

const data = {
  email: 'customer1@gmail.com',
  emailVisibility: true,
  username: 'customer1',
  role: 'user',
  name: 'customer1',
  password: 'something',
  passwordConfirm: 'something',
};

// creating a customer
const record = await pb.collection('users').create(data);

// making user as verified & we need to store the user-id 
const updatedUser = await pb
  .collection('users')
  .update(record.id, { verified: true });

Step 2: (attaching a server)

import PocketBase from 'pocketbase';
import { v4 as uuidv4 } from 'uuid';
const pb = new PocketBase('https://monitoring.up.dflow.sh');

// login as customer
const user = await pb
  .collection('users')
  .authWithPassword('customer1@gmail.com', 'something');

const data = {
  name: 'customer-server-1',
  status: 'pending',
  host: '100.0.0.1',
  port: '45876',
  info: {},
  users: [user.record.id],
};

// create a server record
const server = await pb.collection('systems').create(data);
const token = uuidv4();

const fingerprintData = {
  system: server.id,
  token,
  fingerprint: '',
};


// create a fingerprint record
const fingerprint = await pb.collection('fingerprints').create(fingerprintData);

Step 3: (beszel-agent setup)

# here's a example of the beszel-agent command that need's to be run on customer-machine

dokku apps:create beszel-agent
dokku ports:add beszel-agent http:80:45876
dokku config:set --no-restart beszel-agent LISTEN="45876" KEY="ssh-ed25519xxxxxxxxxxx" TOKEN={fingerprint.token}  HUB_URL="https://monitoring.something.com"
dokku storage:ensure-directory beszel-agent
dokku storage:mount beszel-agent "/var/lib/dokku/data/storage/beszel-agent/sock:/var/run/docker.sock:ro"
dokku storage:mount beszel-agent "/var/lib/dokku/data/storage/beszel-agent/data:/var/lib/beszel-agent"
dokku git:from-image beszel-agent henrygd/beszel-agent
<!-- gh-comment-id:3126971143 --> @pavanbhaskardev commented on GitHub (Jul 28, 2025): Installed beszel on production instance, attached production, proxy server here're steps for adding customer machines to beszel instance **Step 1: (customer account creation)** ```ts import PocketBase from 'pocketbase'; const pb = new PocketBase('https://monitoring.something.com); // login as super-admin user await pb .collection('_superusers') .authWithPassword('admin@example.com', 'password'); const data = { email: 'customer1@gmail.com', emailVisibility: true, username: 'customer1', role: 'user', name: 'customer1', password: 'something', passwordConfirm: 'something', }; // creating a customer const record = await pb.collection('users').create(data); // making user as verified & we need to store the user-id const updatedUser = await pb .collection('users') .update(record.id, { verified: true }); ``` **Step 2: (attaching a server)** ```ts import PocketBase from 'pocketbase'; import { v4 as uuidv4 } from 'uuid'; const pb = new PocketBase('https://monitoring.up.dflow.sh'); // login as customer const user = await pb .collection('users') .authWithPassword('customer1@gmail.com', 'something'); const data = { name: 'customer-server-1', status: 'pending', host: '100.0.0.1', port: '45876', info: {}, users: [user.record.id], }; // create a server record const server = await pb.collection('systems').create(data); const token = uuidv4(); const fingerprintData = { system: server.id, token, fingerprint: '', }; // create a fingerprint record const fingerprint = await pb.collection('fingerprints').create(fingerprintData); ``` **Step 3: (beszel-agent setup)** ```bash # here's a example of the beszel-agent command that need's to be run on customer-machine dokku apps:create beszel-agent dokku ports:add beszel-agent http:80:45876 dokku config:set --no-restart beszel-agent LISTEN="45876" KEY="ssh-ed25519xxxxxxxxxxx" TOKEN={fingerprint.token} HUB_URL="https://monitoring.something.com" dokku storage:ensure-directory beszel-agent dokku storage:mount beszel-agent "/var/lib/dokku/data/storage/beszel-agent/sock:/var/run/docker.sock:ro" dokku storage:mount beszel-agent "/var/lib/dokku/data/storage/beszel-agent/data:/var/lib/beszel-agent" dokku git:from-image beszel-agent henrygd/beszel-agent ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/dflow#235
No description provided.