Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Disk space from other servers #210

Closed
benphelps opened this issue Sep 18, 2022 Discussed in #22 · 13 comments
Closed

[Feature Request] Disk space from other servers #210

benphelps opened this issue Sep 18, 2022 Discussed in #22 · 13 comments
Labels
enhancement New feature or request

Comments

@benphelps
Copy link
Member

Discussed in #22

Originally posted by chrisg991 August 27, 2022
Feature Request:
Please would you add the ability to report free disk space from other servers on the network. Homepage currently displays the disk space, cpu and memory usage of my Docker VM but it would be useful to see those same measures (particularly disk space) for the physical servers on my network.

Thank you

@benphelps benphelps added the enhancement New feature or request label Sep 18, 2022
@ShlomiPorush
Copy link
Contributor

ShlomiPorush commented Sep 18, 2022

you need to mount those disk to the docker vm (in you situation)
i mounted my NASs via smb.
For security concerns, you can mount them as read-only... and that's indeed what I did.

image

@Smiggel
Copy link

Smiggel commented Sep 25, 2022

How can I mount drives using the stack? Tried it, but getting errors all the time that it's not allowed.

@benphelps
Copy link
Member Author

Pretty much every feature and configuration option needed is documented in the wiki, you can find info about the disk resource widget here: https://github.com/benphelps/homepage/wiki/Information-Widgets#resources

@Smiggel
Copy link

Smiggel commented Sep 25, 2022

Doesn’t say how to mount the drive/folder using the stack in docker.

@ShlomiPorush
Copy link
Contributor

ShlomiPorush commented Sep 25, 2022

You need to mount the remote drive on the host server and then add it to homepage container

Add your folder mount to docker-compose.yml
For example

    volumes:
      - /mnt/media1:/mnt/media1:ro
      - /mnt/media2:/mnt/media2:ro

And in widgets.yaml

- resources:
    label: Media1
    disk: /mnt/media1

- resources:
    label: Media2
    disk: /mnt/media2

@Smiggel
Copy link

Smiggel commented Sep 25, 2022

Hmm ok. I will give it a try. Didn’t work for me before. Thanks.

@Smiggel
Copy link

Smiggel commented Sep 25, 2022

You need to mount the remote drive on the host server and then add it to homepage container

Add your folder mount to docker-compose.yml For example

    volumes:
      - /mnt/media1:/mnt/media1:ro
      - /mnt/media2:/mnt/media2:ro

And in widgets.yaml

- resources:
    label: Media1
    disk: /mnt/media1

- resources:
    label: Media2
    disk: /mnt/media2

Thanks. Got it to work now. :-)

@JazzFisch
Copy link
Collaborator

Thanks for all of the great suggestions everyone. I'm closing.

@MortRainey
Copy link

And how do i get CPU and Memory from host. I have running hompage inside a lxc container on proxmox.

@tautomer
Copy link

tautomer commented May 27, 2023

And how do i get CPU and Memory from host. I have running hompage inside a lxc container on proxmox.

I more or less got this worked in a really ugly way.
First, you need mount /proc to your lxc, like what is suggested in the post below
https://www.linuxquestions.org/questions/linux-server-73/using-web-monitor-within-lxc-to-monitor-core-server-4175646014/
Unfortunately, unlike netdata, I don't think you can customize the data source in homepage. They are hardcoded, like

 cpuinfo = fs.readFileSync('/proc/cpuinfo', { encoding: 'utf8' }).toString().split('\n');

So I directly mounted the host's /proc to the lxc's /proc.
Then another issue kicked in https://github.com/lxc/lxd/issues/2238. Directly mounting /proc to the lxc will make it unbootable.
At the end, my whole workaround is

# mount /proc to /mnt/proc
mount -t proc proc /mnt/proc

then modify the lxc settings to mount /mnt/proc

lxc.mount.entry: /mnt/proc proc none bind,create=dir

image
image

CPU, RAM, and up time are all from the host.

I'm not sure if we mount /proc to /host/proc and globally replace all occurrences of "/proc" to "/host/proc" in homepage will work or not. Maybe we should open a new feature request.

@swarshah
Copy link

swarshah commented Nov 1, 2023

And how do i get CPU and Memory from host. I have running hompage inside a lxc container on proxmox.

Better approach here would be to use glances https://gethomepage.dev/v0.7.0/widgets/info/glances/

@crispybegs
Copy link

You need to mount the remote drive on the host server

sorry for the noob question, but can you help with this bit?
I have two separate headless servers, with Homepage running in docker / portainer on one of them.

How can I mount the drives from the non-homepage server to the homepage server, with CLI or something? No UI / sceren access.

Copy link
Contributor

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion for related concerns. See our contributing guidelines for more details.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

8 participants