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

Refactor alias configuration and allow alias for fs devices #1735

Closed
boppy opened this issue Sep 19, 2020 · 2 comments
Closed

Refactor alias configuration and allow alias for fs devices #1735

boppy opened this issue Sep 19, 2020 · 2 comments

Comments

@boppy
Copy link

boppy commented Sep 19, 2020

Description

Feature Request (priority: super-low): It would be nice if one could add aliases for fs devices. Currently (on the web) there is something like that, what is not easy to read nor understand (FYI: I'm running inside docker).

FILE SYS	Used	Total
/rootfs (/dev/nvme1n1p1)	5.19G	78.2G
_tfs/boot (/dev/nvme1n1p2)	133M	1008M
_/var/app (/dev/sda3)		93.3M	2.00T
_r/backup (/dev/sda2)		457G	1.43T
_tfs/home (/dev/sda1)		256M	1.97T
_var/data (/dev/nvme0n1p1)	213G	445G
_/var/dev (/dev/nvme0n1p2)	949M	31.9G
_r/docker (/dev/nvme1n1p4)	28.9G	366G
_olv.conf (/dev/nvme1n1p4)	28.9G	366G
_hostname (/dev/nvme1n1p4)	28.9G	366G
_tc/hosts (/dev/nvme1n1p4)	28.9G	366G

Additionally to having aliases it would also be great to have an allow-list not only a hide-list and/or (even better) a switch to only show fs's that are aliased.

Since I did not find any "deeper-than-one" level of config anywhere, config might be like:

[fs]
show=.*nvme.*

# colon-separated (<path>:<alias>) + comma-separated
alias=/foo/bar/baz:personal,/bar/foo:backup

# Set this to True if only aliased fs should be shown
show_aliased_only=True

Would like to provide some code, but as soon as I open py-files my brain issues some kind of kernel panic... :-D

@nicolargo
Copy link
Owner

Partially implemented in the develop branch for the "show" feature.

For the other one, as alias are already used in others plugins (disk...), we need to refactor the way alias are configure in the Glances conf file. Your proposal is better than the actual one. I propose (in Glances v4) to move all alias from:

foo_alias=value

to

alias=foo:value

@nicolargo nicolargo changed the title [FR] Aliases for FS Refactor alias configuration in the Glances configuration file Sep 25, 2022
@nicolargo nicolargo changed the title Refactor alias configuration in the Glances configuration file Refactor alias configuration and allow alias for fs devices Dec 17, 2023
@nicolargo
Copy link
Owner

Available in the devel branch.

Will be release in Glances 4.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants