henrygd / beszel

Lightweight server monitoring hub with historical data, docker stats, and alerts.
MIT License
1.6k stars 60 forks source link

24h+ chart cannot be displayed when it is just installed, and some new feature suggestions #223

Open ArsFy opened 2 hours ago

ArsFy commented 2 hours ago

Issue

Initial Chart Loading Issue: Upon initial server installation (with insufficient statistics), charts spanning 24 hours or more remain in a perpetual loading state.

image

Feature Suggestions

I've noticed that several features are currently missing from the project. I'd like to contribute by adding the following:

image

(Unfinished)

I am eager to contribute to this project and would appreciate your feedback on these suggestions. I will submit a merge request upon completion of the implementation. (this will be a bit slow)

ArsFy commented 2 hours ago

Maybe I should continue with the design.... hide the code blocks

henrygd commented 1 hour ago

Binary installation

Absolutely, I would welcome this contribution. It's been on my list for a while but haven't gotten around to it yet.

No rush at all. Let me know if you have any questions about the dev setup.

The tabs are a good idea. For the command, I think maybe we do the same thing as docker, with a copy button. Instead of "Copy docker compose" it could say something like "Copy Linux command".

We also have a premade install script which should simplify things. The command could be something like:

curl -sL https://raw.githubusercontent.com/henrygd/beszel/main/supplemental/scripts/install-agent.sh -o install-agent.sh && chmod +x install-agent.sh && ./install-agent.sh -p <port> -k "<key>"

Web SSH / remote command execution

While it would be a great feature, it introduces security concerns the current setup is not equipped for.

Mainly, all users share the same key, and I don't want them to be able to run commands on other users' systems.

I know the majority of people are running single-user instances where that's not an issue. Perhaps it can be an opt-in thing where users can define another key on the agent that's encrypted in the hub.

Unless you have a good idea for this, I'll need to think about it further and maybe make a discussion post to get other opinions.

Initial Chart Loading

To me it seems logical to show a loading indicator if there are no records yet. They will populate eventually if you leave the page open for long enough.

What would you suggest instead? Maybe a message that says no records have been populated yet?


One other thing - I noticed your CPU is showing 8 core / 8 threads. Are you restricting that in your environment, or is that being read incorrectly?

ArsFy commented 1 hour ago

Thanks for your reply, I didn't expect it to be so comprehensive and quick.

First, thanks for your script, I will do this.

About web ssh

I think you are right, I overlooked that this is a multi-user system which may bring more security issues. It needs a better solution and community discussion.

About Chart Loading

I think it needs to indicate that there is not enough data. An hour of waiting is too long. And it may make users wonder if there is a problem with the server.

About my CPU

This is because it is running in a virtual machine, the program is good, don't worry.