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

Add a custom label to external disks #379

Open
Flowwwww opened this issue Jan 8, 2025 · 1 comment
Open

Add a custom label to external disks #379

Flowwwww opened this issue Jan 8, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@Flowwwww
Copy link

Flowwwww commented Jan 8, 2025

Hello,
Thank you for this project. I'm loving it !

I mainly use it to monitor some external drives and couldn't find a way to modify the disk label in charts.
It is currently showing the devices names (/dev/sdh2 for example). I don't find it very explicit.

Would it be possible to add a configuration that allow end-user to add a custom label for each external drive ?

@henrygd
Copy link
Owner

henrygd commented Jan 8, 2025

I agree we need a solution for this.

I've been thinking about adding an optional config file for the agent, which would be a good place to specify disk options as well.

Something like this, which could be passed to the agent via CONFIG=/path/to/config.yml.

# device information
devices:
  sda1:
    name: Extra Disk One
  pool01:
    name: ZFS Storage Pool
    io: ["sdc", "sdd", "sde"]

# monitor network services / devices
services:
  - name: paperless
    host: 192.168.8.8:8000
    type: http
  - name: security-camera
    host: 192.168.8.14
    type: ping

# define custom charts
charts:
  - name: HTTP Connections
    desc: Current number of HTTP connections to the server
    cmd: example-command | grep xxx | sed 's/xxx/xxx/'
  - name: Another Chart
    desc: Lorem ipsum dolor sit amet consectetur
    file: /path/to/file

There's also a separate issue where device paths can change after reboot on some systems (#294), so we may need to use a different identifier instead, like UUID or mount path.

@henrygd henrygd added the enhancement New feature or request label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants