diff --git a/etc/telegraf.conf b/etc/telegraf.conf index 5a7db1ba5..fe67d6f2d 100644 --- a/etc/telegraf.conf +++ b/etc/telegraf.conf @@ -7809,8 +7809,6 @@ # # poolMetrics = false # # ## By default, don't gather dataset stats -# ## On FreeBSD, if the user has enabled listsnapshots in the pool property, -# ## telegraf may not be able to correctly parse the output. # # datasetMetrics = false diff --git a/etc/telegraf_windows.conf b/etc/telegraf_windows.conf index d834c8fbf..76e2a9a60 100644 --- a/etc/telegraf_windows.conf +++ b/etc/telegraf_windows.conf @@ -7705,8 +7705,6 @@ # # poolMetrics = false # # ## By default, don't gather dataset stats -# ## On FreeBSD, if the user has enabled listsnapshots in the pool property, -# ## telegraf may not be able to correctly parse the output. # # datasetMetrics = false diff --git a/plugins/inputs/zfs/README.md b/plugins/inputs/zfs/README.md index fdaeadf08..c4df5f8d4 100644 --- a/plugins/inputs/zfs/README.md +++ b/plugins/inputs/zfs/README.md @@ -34,8 +34,6 @@ See the [CONFIGURATION.md][CONFIGURATION.md] for more details. # poolMetrics = false ## By default, don't gather dataset stats - ## On FreeBSD, if the user has enabled listsnapshots in the pool property, - ## telegraf may not be able to correctly parse the output. # datasetMetrics = false ``` diff --git a/plugins/inputs/zfs/sample.conf b/plugins/inputs/zfs/sample.conf index c5014b345..76b57e2ba 100644 --- a/plugins/inputs/zfs/sample.conf +++ b/plugins/inputs/zfs/sample.conf @@ -16,6 +16,4 @@ # poolMetrics = false ## By default, don't gather dataset stats - ## On FreeBSD, if the user has enabled listsnapshots in the pool property, - ## telegraf may not be able to correctly parse the output. # datasetMetrics = false diff --git a/plugins/inputs/zfs/zfs_freebsd.go b/plugins/inputs/zfs/zfs_freebsd.go index f7d6df1a1..55162a9f0 100644 --- a/plugins/inputs/zfs/zfs_freebsd.go +++ b/plugins/inputs/zfs/zfs_freebsd.go @@ -187,7 +187,7 @@ func zpool() ([]string, error) { } func zdataset(properties []string) ([]string, error) { - return run("zfs", []string{"list", "-Hp", "-o", strings.Join(properties, ",")}...) + return run("zfs", []string{"list", "-Hp", "-t", "filesystem,volume", "-o", strings.Join(properties, ",")}...) } func sysctl(metric string) ([]string, error) {