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

Get additional ZFS properties #43

Open
rkelley-psna opened this issue Jun 28, 2024 · 2 comments
Open

Get additional ZFS properties #43

rkelley-psna opened this issue Jun 28, 2024 · 2 comments

Comments

@rkelley-psna
Copy link

It is possible to add a few more ZFS properties to the zfs_dataset.go file? In particular:

  • Recordsize (zfs get recordsize)
  • Mount point (zfs get mountpoint)
  • Compression type (zfs get compression)
  • Primary Cache (zfs get primarycache)
  • Secondary Cache (zfs get secondarycache)

Thank you.

@pdf
Copy link
Owner

pdf commented Jun 28, 2024

What's your use-case for the additional text fields? I'm hesitant to add labels for the sake of it, unless they're useful for querying metrics.

@rkelley-psna
Copy link
Author

Thanks for the quick reply. We run a number of ZFS servers each with lots of datasets - and each dataset with various options (recordsize, mountpoint, compression type, etc). We would like to visualize this data via a table in Grafana so our admin team can quickly identify performance issues and misconfiguration issues between our servers.

As an example, here is the output from a custom python script that shows this data:

ZFS Dataset Detail: export/test3
===========================================================
   Attribute                Value
===========================================================
   Mount Point              /export/test3
   Logical space used       42K
   Real space used          96K
   Compression Ratio        1.00x
   Compression Type         zstd
   Dataset Space Available  48.0G
   Record Size              1M
   Primary Cache type       all
   Secondary Cache type     all
   atime:                   on
   relatime:                off
   xattr:                   on
   Log Bias                 latency
   Reservation              none
   Quota                    none


ZFS Dataset Detail: export/test4
===========================================================
   Attribute                Value
===========================================================
   Mount Point              /export/test4
   Logical space used       42K
   Real space used          96K
   Compression Ratio        1.00x
   Compression Type         off
   Dataset Space Available  48.0G
   Record Size              1M
   Primary Cache type       all
   Secondary Cache type     all
   atime:                   on
   relatime:                off
   xattr:                   on
   Log Bias                 latency
   Reservation              none
   Quota                    none

While I am not a go programmer, I can probably make the changes to a local copy of the zfs_exporter git repo and compile a new binary. But, I thought this would be useful properties for other people as well.

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

No branches or pull requests

2 participants