fix(inputs.zfs): Unbreak datasets stats gathering in case listsnaps is enabled on a zfs pool (#12307)
This commit is contained in:
parent
70b33c2649
commit
41c9af5bb8
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue