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

fix(inputs/zfs): resolve README.md linter issues #10109

Merged
merged 1 commit into from
Nov 17, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 38 additions & 34 deletions plugins/inputs/zfs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This ZFS plugin provides metrics from your ZFS filesystems. It supports ZFS on
Linux and FreeBSD. It gets ZFS stat from `/proc/spl/kstat/zfs` on Linux and
from `sysctl`, 'zfs' and `zpool` on FreeBSD.

### Configuration:
## Configuration

```toml
[[inputs.zfs]]
Expand All @@ -27,7 +27,7 @@ from `sysctl`, 'zfs' and `zpool` on FreeBSD.
# datasetMetrics = false
```

### Measurements & Fields:
### Measurements & Fields

By default this plugin collects metrics about ZFS internals pool and dataset.
These metrics are either counters or measure sizes
Expand Down Expand Up @@ -189,53 +189,53 @@ each dataset.
On Linux (reference: kstat accumulated time and queue length statistics):

- zfs_pool
- nread (integer, bytes)
- nwritten (integer, bytes)
- reads (integer, count)
- writes (integer, count)
- wtime (integer, nanoseconds)
- wlentime (integer, queuelength * nanoseconds)
- wupdate (integer, timestamp)
- rtime (integer, nanoseconds)
- rlentime (integer, queuelength * nanoseconds)
- rupdate (integer, timestamp)
- wcnt (integer, count)
- rcnt (integer, count)
- nread (integer, bytes)
- nwritten (integer, bytes)
- reads (integer, count)
- writes (integer, count)
- wtime (integer, nanoseconds)
- wlentime (integer, queuelength * nanoseconds)
- wupdate (integer, timestamp)
- rtime (integer, nanoseconds)
- rlentime (integer, queuelength * nanoseconds)
- rupdate (integer, timestamp)
- wcnt (integer, count)
- rcnt (integer, count)

On FreeBSD:

- zfs_pool
- allocated (integer, bytes)
- capacity (integer, bytes)
- dedupratio (float, ratio)
- free (integer, bytes)
- size (integer, bytes)
- fragmentation (integer, percent)
- allocated (integer, bytes)
- capacity (integer, bytes)
- dedupratio (float, ratio)
- free (integer, bytes)
- size (integer, bytes)
- fragmentation (integer, percent)

#### Dataset Metrics (optional, only on FreeBSD)

- zfs_dataset
- avail (integer, bytes)
- used (integer, bytes)
- usedsnap (integer, bytes
- usedds (integer, bytes)
- avail (integer, bytes)
- used (integer, bytes)
- usedsnap (integer, bytes
- usedds (integer, bytes)

### Tags:
### Tags

- ZFS stats (`zfs`) will have the following tag:
- pools - A `::` concatenated list of all ZFS pools on the machine.
- datasets - A `::` concatenated list of all ZFS datasets on the machine.
- pools - A `::` concatenated list of all ZFS pools on the machine.
- datasets - A `::` concatenated list of all ZFS datasets on the machine.

- Pool metrics (`zfs_pool`) will have the following tag:
- pool - with the name of the pool which the metrics are for.
- health - the health status of the pool. (FreeBSD only)
- pool - with the name of the pool which the metrics are for.
- health - the health status of the pool. (FreeBSD only)

- Dataset metrics (`zfs_dataset`) will have the following tag:
- dataset - with the name of the dataset which the metrics are for.
- dataset - with the name of the dataset which the metrics are for.

### Example Output:
### Example Output

```
```shell
$ ./telegraf --config telegraf.conf --input-filter zfs --test
* Plugin: zfs, Collection 1
> zfs_pool,health=ONLINE,pool=zroot allocated=1578590208i,capacity=2i,dedupratio=1,fragmentation=1i,free=64456531968i,size=66035122176i 1464473103625653908
Expand Down Expand Up @@ -287,8 +287,9 @@ A short description for some of the metrics.

`arcstats_evict_l2_ineligible` We evicted something which cannot be stored in the l2.
Reasons could be:
- We have multiple pools, we evicted something from a pool without an l2 device.
- The zfs property secondary cache.

- We have multiple pools, we evicted something from a pool without an l2 device.
- The zfs property secondary cache.

`arcstats_c` Arc target size, this is the size the system thinks the arc should have.

Expand All @@ -313,13 +314,15 @@ A short description for some of the metrics.
`zfetchstats_stride_hits` Counts the number of cache hits, to items which are in the cache because of the prefetcher (prefetched stride reads)

#### Vdev Cache Stats (FreeBSD only)

note: the vdev cache is deprecated in some ZFS implementations

`vdev_cache_stats_hits` Hits to the vdev (device level) cache.

`vdev_cache_stats_misses` Misses to the vdev (device level) cache.

#### ABD Stats (Linux Only)

ABD is a linear/scatter dual typed buffer for ARC

`abdstats_linear_cnt` number of linear ABDs which are currently allocated
Expand All @@ -343,6 +346,7 @@ ABD is a linear/scatter dual typed buffer for ARC
`fm_erpt-dropped` counts when an error report cannot be created (eg available memory is too low)

#### ZIL (Linux Only)

note: ZIL measurements are system-wide, neither per-pool nor per-dataset

`zil_commit_count` counts when ZFS transactions are committed to a ZIL