|
1 | 1 | ############################################################################## |
2 | 2 | # Performance Playbook (estat, nfs_threads) collection |
3 | 3 | # Note: estat_nfs, estat_iscsi, and estat_backend-io live in |
4 | | -# telegraf.inputs.nfs_iscsi and are always collected when InfluxDB is |
| 4 | +# telegraf.inputs.storage_io and are always collected when InfluxDB is |
5 | 5 | # enabled, independent of playbook state. |
6 | 6 |
|
7 | 7 | # Collect output from "estat zpl -jm 10" |
|
88 | 88 | # PROCESSOR PLUGINS # |
89 | 89 | ############################################################################### |
90 | 90 | # Convert strings from estat into integer values so they don't get dropped. |
91 | | -# Scoped to playbook-only metrics; estat_nfs/iscsi have their own converter |
92 | | -# in telegraf.inputs.nfs_iscsi. |
| 91 | +# Scoped to playbook-only metrics; estat_nfs/iscsi/backend-io have their own |
| 92 | +# converter in telegraf.inputs.storage_io. |
93 | 93 | [[processors.converter]] |
94 | 94 | namepass = ["estat_zpl", "estat_zio", "estat_zvol", "estat_zio-queue", "estat_metaslab-alloc"] |
95 | 95 | [processors.converter.fields] |
96 | 96 | integer = ["iops(/s)", "avg latency(us)", "stddev(us)", "throughput(k/s)"] |
97 | 97 |
|
98 | | -# The estat output contains a nested latency histogram, so we need to |
99 | | -# parse that out as a new array metric rather than a non-JSON string. |
100 | | -# |
101 | | -# From this: |
102 | | -# "microseconds":"{20000,5},{30000,15},{40000,3},{50000,24}" |
103 | | -# to this: |
104 | | -# "microseconds":"{20000:5,30000:15,40000:3,50000:24}" |
105 | | -# |
106 | | -# Clone the original so we have a "new" metric with a "hist_" name prefix |
| 98 | +# Parse microseconds latency histograms for playbook estat measurements. |
| 99 | +# Transforms "{20000,5},{30000,15}" → {"20000":5,"30000":15} as a JSON object. |
| 100 | +# Scoped to playbook-only measurements; storage_io (estat_nfs/iscsi/backend-io) |
| 101 | +# does not collect microseconds to keep always-on data volume low. |
107 | 102 | [[processors.clone]] |
108 | 103 | order = 1 |
109 | 104 | name_prefix = "hist_" |
110 | | - namepass = ["estat_*"] |
| 105 | + namepass = ["estat_zpl", "estat_zvol", "estat_zio", "estat_zio-queue", "estat_metaslab-alloc"] |
111 | 106 |
|
112 | | -# Rewrite the histograms for the "hist_estat_*" metrics as JSON objects |
113 | 107 | [[processors.regex]] |
114 | 108 | order = 2 |
115 | | - namepass = ["hist_estat_*"] |
| 109 | + namepass = ["hist_estat_zpl", "hist_estat_zvol", "hist_estat_zio", "hist_estat_zio-queue", "hist_estat_metaslab-alloc"] |
116 | 110 | [[processors.regex.fields]] |
117 | 111 | key = "microseconds" |
118 | 112 | pattern = "{(\\d+),(\\d+)}" |
|
122 | 116 | pattern = ".*" |
123 | 117 | replacement = "{$0}" |
124 | 118 |
|
125 | | -# Now parse out the arrays for "hist_estat_*" metrics |
126 | 119 | [[processors.parser]] |
127 | 120 | order = 3 |
128 | 121 | merge = "override" |
129 | 122 | parse_fields = ["microseconds"] |
130 | 123 | drop_original = false |
131 | 124 | data_format = "json" |
132 | | - namepass = ["hist_estat_*"] |
| 125 | + namepass = ["hist_estat_zpl", "hist_estat_zvol", "hist_estat_zio", "hist_estat_zio-queue", "hist_estat_metaslab-alloc"] |
133 | 126 | fieldpass = ["microseconds"] |
134 | 127 |
|
135 | 128 | # End of Processor section |
|
0 commit comments