same values for zfs metrics on FreeBSD
Host operating system: output of uname -a
FreeBSD backup12.0-RELEASE FreeBSD 12.0-RELEASE r341666 GENERIC amd64
node_exporter version: output of node_exporter --version
node_exporter, version 0.17.0 (branch: release-0.17, revision: 0) build user: root build date: go version: go1.11.4
node_exporter command line flags
None
Are you running node_exporter in Docker?
No
What did you do that produced an error?
zfs metrics are the same for :
- node_filesystem_avail_bytes{device="BACKUP",fstype="zfs",mountpoint="/mnt/BACKUP"} 1.635050061824e+12
- node_filesystem_free_bytes{device="BACKUP",fstype="zfs",mountpoint="/mnt/BACKUP"} 1.635050061824e+12
- node_filesystem_size_bytes{device="BACKUP",fstype="zfs",mountpoint="/mnt/BACKUP"} 1.635050151936e+12
What did you expect to see?
different values between free and size
root@backup:~ # zpool list
NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
BACKUP 1.81T 275G 1.54T - - 0% 14% 1.00x ONLINE -
What did you see instead?
same values
Thanks for this amazing tool 👍
Ah yes, I'd love some ZFS on FreeBSD also.
How did you get ZFS metrics on FreeBSD? ZFS on FreeBSD is not supported at this time.
By the official port manager 'pkg' Any chance being support one day ?
Sorry, I was confused, this data is coming from the filesystem collector, not a ZFS-specific collector.
The filesystem collector is getting the information from the BSD syscall unix.Getfsstat(). I don't know enough about ZFS on BSD to say what the issue is, but incorrect reporting is possibly not something we can fix as it's simply passing the data we get from BSD.
What is the output of df for that filesystem?
here it is
root@backup:~ # df -h
Filesystem Size Used Avail Capacity Mounted on
zroot/ROOT/default 25G 1.0G 24G 4% /
devfs 1.0K 1.0K 0B 100% /dev
BACKUP 1.5T 23G 1.5T 1% /mnt/BACKUP
BACKUP/clement 1.5T 104K 1.5T 0% /mnt/BACKUP/clement
BACKUP/clement/multimedia 1.5T 88K 1.5T 0% /mnt/BACKUP/clement/multimedia
zroot/tmp 24G 108K 24G 0% /tmp
zroot/usr/home 24G 168K 24G 0% /usr/home
zroot/usr/ports 25G 715M 24G 3% /usr/ports
zroot/usr/src 24G 88K 24G 0% /usr/src
zroot/var/audit 24G 88K 24G 0% /var/audit
zroot/var/crash 24G 88K 24G 0% /var/crash
zroot/var/log 24G 988K 24G 0% /var/log
zroot/var/mail 24G 108K 24G 0% /var/mail
zroot/var/tmp 24G 88K 24G 0% /var/tmp
zroot 24G 88K 24G 0% /zroot
BACKUP/clement/iocage/download 1.5T 88K 1.5T 0% /mnt/BACKUP/clement/iocage/download
BACKUP/clement/iocage/images 1.5T 88K 1.5T 0% /mnt/BACKUP/clement/iocage/images
BACKUP/clement/iocage/jails/apache 1.5T 104K 1.5T 0% /mnt/BACKUP/clement/iocage/jails/apache
BACKUP/clement/iocage/jails/graphite 1.5T 92K 1.5T 0% /mnt/BACKUP/clement/iocage/jails/graphite
BACKUP/clement/iocage/jails/mariadb 1.5T 92K 1.5T 0% /mnt/BACKUP/clement/iocage/jails/mariadb
BACKUP/clement/iocage/jails/plex 1.5T 96K 1.5T 0% /mnt/BACKUP/clement/iocage/jails/plex
BACKUP/clement/iocage/jails/box 1.5T 96K 1.5T 0% /mnt/BACKUP/clement/iocage/jails/box
BACKUP/clement/iocage/jails/transmission 1.5T 96K 1.5T 0% /mnt/BACKUP/clement/iocage/jails/transmission
BACKUP/clement/iocage/log 1.5T 124K 1.5T 0% /mnt/BACKUP/clement/iocage/log
BACKUP/clement/iocage/releases/11.1-RELEASE 1.5T 88K 1.5T 0% /mnt/BACKUP/clement/iocage/releases/11.1-RELEASE
BACKUP/clement/iocage/releases/11.2-RELEASE 1.5T 88K 1.5T 0% /mnt/BACKUP/clement/iocage/releases/11.2-RELEASE
BACKUP/clement/iocage/templates 1.5T 88K 1.5T 0% /mnt/BACKUP/clement/iocage/templates
BACKUP/clement/iocage/jails 1.5T 96K 1.5T 0% /mnt/BACKUP/clement/iocage/jails
BACKUP/clement/iocage/releases 1.5T 88K 1.5T 0% /mnt/BACKUP/clement/iocage/releases
BACKUP/clement/iocage/jails/box/root 1.5T 1.7G 1.5T 0% /mnt/snapshot
zfs list is more appropriate for this filesystem
root@backup:~ # zfs list
NAME USED AVAIL REFER MOUNTPOINT
BACKUP 305G 1.46T 22.5G /mnt/BACKUP
BACKUP/clement 282G 1.46T 104K /mnt/BACKUP/clement
BACKUP/clement/home 20.6G 1.46T 20.6G /mnt/BACKUP/clement/home
BACKUP/clement/iocage 38.6G 1.46T 4.41M /iocage
BACKUP/clement/iocage/download 385M 1.46T 88K /iocage/download
BACKUP/clement/iocage/download/11.1-RELEASE 260M 1.46T 260M /iocage/download/11.1-RELEASE
BACKUP/clement/iocage/download/11.2-RELEASE 125M 1.46T 125M /iocage/download/11.2-RELEASE
BACKUP/clement/iocage/images 88K 1.46T 88K /iocage/images
BACKUP/clement/iocage/jails 36.9G 1.46T 96K /iocage/jails
BACKUP/clement/iocage/jails/apache 23.5G 1.46T 104K /iocage/jails/apache
BACKUP/clement/iocage/jails/apache/root 23.5G 1.46T 12.6G /iocage/jails/apache/root
BACKUP/clement/iocage/jails/graphite 2.12G 1.46T 92K /iocage/jails/graphite
BACKUP/clement/iocage/jails/graphite/root 2.12G 1.46T 1.65G /iocage/jails/graphite/root
BACKUP/clement/iocage/jails/mariadb 1.41G 1.46T 92K /iocage/jails/mariadb
BACKUP/clement/iocage/jails/mariadb/data 88K 1.46T 88K none
BACKUP/clement/iocage/jails/mariadb/root 1.41G 1.46T 1.33G /iocage/jails/mariadb/root
BACKUP/clement/iocage/jails/plex 6.41G 1.46T 96K /iocage/jails/plex
BACKUP/clement/iocage/jails/plex/data 88K 1.46T 88K none
BACKUP/clement/iocage/jails/plex/root 6.41G 1.46T 5.95G /iocage/jails/plex/root
BACKUP/clement/iocage/jails/box 1.91G 1.46T 96K /iocage/jails/box
BACKUP/clement/iocage/jails/box/data 88K 1.46T 88K none
BACKUP/clement/iocage/jails/box/root 1.91G 1.46T 1.70G /iocage/jails/box/root
BACKUP/clement/iocage/jails/transmission 1.53G 1.46T 96K /iocage/jails/transmission
BACKUP/clement/iocage/jails/transmission/root 1.53G 1.46T 1.50G /iocage/jails/transmission/root
BACKUP/clement/iocage/log 124K 1.46T 124K /iocage/log
BACKUP/clement/iocage/releases 1.27G 1.46T 88K /iocage/releases
BACKUP/clement/iocage/releases/11.1-RELEASE 983M 1.46T 88K /iocage/releases/11.1-RELEASE
BACKUP/clement/iocage/releases/11.1-RELEASE/root 983M 1.46T 973M /iocage/releases/11.1-RELEASE/root
BACKUP/clement/iocage/releases/11.2-RELEASE 316M 1.46T 88K /iocage/releases/11.2-RELEASE
BACKUP/clement/iocage/releases/11.2-RELEASE/root 316M 1.46T 316M /iocage/releases/11.2-RELEASE/root
BACKUP/clement/iocage/templates 88K 1.46T 88K /iocage/templates
BACKUP/clement/multimedia 223G 1.46T 88K /mnt/BACKUP/clement/multimedia
BACKUP/clement/multimedia/images 223G 1.46T 223G /mnt/BACKUP/clement/multimedia/images
zroot 1.73G 24.4G 88K /zroot
zroot/ROOT 1.03G 24.4G 88K none
zroot/ROOT/default 1.03G 24.4G 1.03G /
zroot/tmp 108K 24.4G 108K /tmp
zroot/usr 715M 24.4G 88K /usr
zroot/usr/home 168K 24.4G 168K /usr/home
zroot/usr/ports 715M 24.4G 715M /usr/ports
zroot/usr/src 88K 24.4G 88K /usr/src
zroot/var 1.42M 24.4G 88K /var
zroot/var/audit 88K 24.4G 88K /var/audit
zroot/var/crash 88K 24.4G 88K /var/crash
zroot/var/log 992K 24.4G 992K /var/log
zroot/var/mail 108K 24.4G 108K /var/mail
zroot/var/tmp 88K 24.4G 88K /var/tmp
So looks like the node-exporter is returning what df is, which is as intended. To get more zfs details, we'd need to support zfs on freebsd explicitly.
I'd be open to include zfs support for freebsd if somebody wants to submit a PR which follows the contribution guidelines (e.g no shelling out, no root permissions required).
Either way, I think this should get closed. If you're interested, you can open an issue for general zfs support on freebsd.