henrygd / beszel

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

Agents on LXC Containers show RAM Usage of Proxmox Host #176

Open heeelga opened 2 months ago

heeelga commented 2 months ago

I have deployed the Beszel agent on several LXC containers on Proxmox which have different amounts of RAM. Unfortunately every agent is showing 32GB of RAM in the UI which is the total amount of RAM of the Proxmox host. RAM usage is also showing the exact same value for every agent.

I tried changing the corresponding LXCs to unprivileged/privileged, turned on and off Nesting without any effect.

CPU and disk usage seem to work fine.

Am I missing an option here?

heeelga commented 2 months ago

PS: I just figured out that this only occurs when using the dockerized agent.

henrygd commented 2 months ago

Thanks for the info, I'll look into it.

henrygd commented 1 month ago

To clarify, the binary agent correctly shows the memory allocated to the LXC container?

But installing Docker in the container and running the agent with Docker shows the memory info for the host?

Could you please tell me what free -h and cat /sys/fs/cgroup/memory.max output in the container?

heeelga commented 1 month ago

Yes, exactly. The docker agent shows the memory for the host and the binary agent shows the correct memory allocated to the specific LXC container it is running on.

Sure thing. I checked on a exemplary LXC and the amount of memory (1G) is correct.

free -h: total used free shared buff/cache available Mem: 1.0Gi 178Mi 659Mi 48Ki 186Mi 845Mi Swap: 1.0Gi 122Mi 901Mi

cat /sys/fs/cgroup/memory.max: max

jlssmt commented 5 days ago

can confirm the same issue. i don't know how to access shell inside the agent container sh and bash are not found.