aboutsummaryrefslogtreecommitdiff
path: root/collector
diff options
context:
space:
mode:
authorSteven Kreuzer <skreuzer@freebsd.org>2019-07-15 10:28:09 -0400
committerBen Kochie <superq@gmail.com>2019-07-15 16:28:09 +0200
commitd8e47a9f9fb9bc3e8101c4bc6e8bd8c7a30663f5 (patch)
tree1aafd9063cc9b960b8ca27a0030b124d836c14af /collector
parent0de95ef8f37d71e41ee325f5f1b5cfe7983999c8 (diff)
downloadprometheus_node_collector-d8e47a9f9fb9bc3e8101c4bc6e8bd8c7a30663f5.tar.bz2
prometheus_node_collector-d8e47a9f9fb9bc3e8101c4bc6e8bd8c7a30663f5.tar.xz
prometheus_node_collector-d8e47a9f9fb9bc3e8101c4bc6e8bd8c7a30663f5.zip
Expose additional XFS runtime statistics (#1423)
Include directory operation, read/write system call, and vnode runtime statistics for XFS filesystems. Signed-off-by: Steven Kreuzer <skreuzer@FreeBSD.org>
Diffstat (limited to 'collector')
-rw-r--r--collector/fixtures/e2e-64k-page-output.txt39
-rw-r--r--collector/fixtures/e2e-output.txt39
-rw-r--r--collector/xfs_linux.go65
3 files changed, 143 insertions, 0 deletions
diff --git a/collector/fixtures/e2e-64k-page-output.txt b/collector/fixtures/e2e-64k-page-output.txt
index 7f503c8..8e9ba2c 100644
--- a/collector/fixtures/e2e-64k-page-output.txt
+++ b/collector/fixtures/e2e-64k-page-output.txt
@@ -2652,6 +2652,18 @@ node_xfs_block_mapping_unmaps_total{device="sda1"} 1
2652# HELP node_xfs_block_mapping_writes_total Number of block map for write operations for a filesystem. 2652# HELP node_xfs_block_mapping_writes_total Number of block map for write operations for a filesystem.
2653# TYPE node_xfs_block_mapping_writes_total counter 2653# TYPE node_xfs_block_mapping_writes_total counter
2654node_xfs_block_mapping_writes_total{device="sda1"} 29 2654node_xfs_block_mapping_writes_total{device="sda1"} 29
2655# HELP node_xfs_directory_operation_create_total Number of times a new directory entry was created for a filesystem.
2656# TYPE node_xfs_directory_operation_create_total counter
2657node_xfs_directory_operation_create_total{device="sda1"} 2
2658# HELP node_xfs_directory_operation_getdents_total Number of times the directory getdents operation was performed for a filesystem.
2659# TYPE node_xfs_directory_operation_getdents_total counter
2660node_xfs_directory_operation_getdents_total{device="sda1"} 52
2661# HELP node_xfs_directory_operation_lookup_total Number of file name directory lookups which miss the operating systems directory name lookup cache.
2662# TYPE node_xfs_directory_operation_lookup_total counter
2663node_xfs_directory_operation_lookup_total{device="sda1"} 3
2664# HELP node_xfs_directory_operation_remove_total Number of times an existing directory entry was created for a filesystem.
2665# TYPE node_xfs_directory_operation_remove_total counter
2666node_xfs_directory_operation_remove_total{device="sda1"} 1
2655# HELP node_xfs_extent_allocation_blocks_allocated_total Number of blocks allocated for a filesystem. 2667# HELP node_xfs_extent_allocation_blocks_allocated_total Number of blocks allocated for a filesystem.
2656# TYPE node_xfs_extent_allocation_blocks_allocated_total counter 2668# TYPE node_xfs_extent_allocation_blocks_allocated_total counter
2657node_xfs_extent_allocation_blocks_allocated_total{device="sda1"} 872 2669node_xfs_extent_allocation_blocks_allocated_total{device="sda1"} 872
@@ -2664,6 +2676,33 @@ node_xfs_extent_allocation_extents_allocated_total{device="sda1"} 1
2664# HELP node_xfs_extent_allocation_extents_freed_total Number of extents freed for a filesystem. 2676# HELP node_xfs_extent_allocation_extents_freed_total Number of extents freed for a filesystem.
2665# TYPE node_xfs_extent_allocation_extents_freed_total counter 2677# TYPE node_xfs_extent_allocation_extents_freed_total counter
2666node_xfs_extent_allocation_extents_freed_total{device="sda1"} 0 2678node_xfs_extent_allocation_extents_freed_total{device="sda1"} 0
2679# HELP node_xfs_read_calls_total Number of read(2) system calls made to files in a filesystem.
2680# TYPE node_xfs_read_calls_total counter
2681node_xfs_read_calls_total{device="sda1"} 28
2682# HELP node_xfs_vnode_active_total Number of vnodes not on free lists for a filesystem.
2683# TYPE node_xfs_vnode_active_total counter
2684node_xfs_vnode_active_total{device="sda1"} 4
2685# HELP node_xfs_vnode_allocate_total Number of times vn_alloc called for a filesystem.
2686# TYPE node_xfs_vnode_allocate_total counter
2687node_xfs_vnode_allocate_total{device="sda1"} 0
2688# HELP node_xfs_vnode_get_total Number of times vn_get called for a filesystem.
2689# TYPE node_xfs_vnode_get_total counter
2690node_xfs_vnode_get_total{device="sda1"} 0
2691# HELP node_xfs_vnode_hold_total Number of times vn_hold called for a filesystem.
2692# TYPE node_xfs_vnode_hold_total counter
2693node_xfs_vnode_hold_total{device="sda1"} 0
2694# HELP node_xfs_vnode_reclaim_total Number of times vn_reclaim called for a filesystem.
2695# TYPE node_xfs_vnode_reclaim_total counter
2696node_xfs_vnode_reclaim_total{device="sda1"} 1
2697# HELP node_xfs_vnode_release_total Number of times vn_rele called for a filesystem.
2698# TYPE node_xfs_vnode_release_total counter
2699node_xfs_vnode_release_total{device="sda1"} 1
2700# HELP node_xfs_vnode_remove_total Number of times vn_remove called for a filesystem.
2701# TYPE node_xfs_vnode_remove_total counter
2702node_xfs_vnode_remove_total{device="sda1"} 1
2703# HELP node_xfs_write_calls_total Number of write(2) system calls made to files in a filesystem.
2704# TYPE node_xfs_write_calls_total counter
2705node_xfs_write_calls_total{device="sda1"} 0
2667# HELP node_zfs_abd_linear_cnt kstat.zfs.misc.abdstats.linear_cnt 2706# HELP node_zfs_abd_linear_cnt kstat.zfs.misc.abdstats.linear_cnt
2668# TYPE node_zfs_abd_linear_cnt untyped 2707# TYPE node_zfs_abd_linear_cnt untyped
2669node_zfs_abd_linear_cnt 62 2708node_zfs_abd_linear_cnt 62
diff --git a/collector/fixtures/e2e-output.txt b/collector/fixtures/e2e-output.txt
index b3f750a..dab7df8 100644
--- a/collector/fixtures/e2e-output.txt
+++ b/collector/fixtures/e2e-output.txt
@@ -2652,6 +2652,18 @@ node_xfs_block_mapping_unmaps_total{device="sda1"} 1
2652# HELP node_xfs_block_mapping_writes_total Number of block map for write operations for a filesystem. 2652# HELP node_xfs_block_mapping_writes_total Number of block map for write operations for a filesystem.
2653# TYPE node_xfs_block_mapping_writes_total counter 2653# TYPE node_xfs_block_mapping_writes_total counter
2654node_xfs_block_mapping_writes_total{device="sda1"} 29 2654node_xfs_block_mapping_writes_total{device="sda1"} 29
2655# HELP node_xfs_directory_operation_create_total Number of times a new directory entry was created for a filesystem.
2656# TYPE node_xfs_directory_operation_create_total counter
2657node_xfs_directory_operation_create_total{device="sda1"} 2
2658# HELP node_xfs_directory_operation_getdents_total Number of times the directory getdents operation was performed for a filesystem.
2659# TYPE node_xfs_directory_operation_getdents_total counter
2660node_xfs_directory_operation_getdents_total{device="sda1"} 52
2661# HELP node_xfs_directory_operation_lookup_total Number of file name directory lookups which miss the operating systems directory name lookup cache.
2662# TYPE node_xfs_directory_operation_lookup_total counter
2663node_xfs_directory_operation_lookup_total{device="sda1"} 3
2664# HELP node_xfs_directory_operation_remove_total Number of times an existing directory entry was created for a filesystem.
2665# TYPE node_xfs_directory_operation_remove_total counter
2666node_xfs_directory_operation_remove_total{device="sda1"} 1
2655# HELP node_xfs_extent_allocation_blocks_allocated_total Number of blocks allocated for a filesystem. 2667# HELP node_xfs_extent_allocation_blocks_allocated_total Number of blocks allocated for a filesystem.
2656# TYPE node_xfs_extent_allocation_blocks_allocated_total counter 2668# TYPE node_xfs_extent_allocation_blocks_allocated_total counter
2657node_xfs_extent_allocation_blocks_allocated_total{device="sda1"} 872 2669node_xfs_extent_allocation_blocks_allocated_total{device="sda1"} 872
@@ -2664,6 +2676,33 @@ node_xfs_extent_allocation_extents_allocated_total{device="sda1"} 1
2664# HELP node_xfs_extent_allocation_extents_freed_total Number of extents freed for a filesystem. 2676# HELP node_xfs_extent_allocation_extents_freed_total Number of extents freed for a filesystem.
2665# TYPE node_xfs_extent_allocation_extents_freed_total counter 2677# TYPE node_xfs_extent_allocation_extents_freed_total counter
2666node_xfs_extent_allocation_extents_freed_total{device="sda1"} 0 2678node_xfs_extent_allocation_extents_freed_total{device="sda1"} 0
2679# HELP node_xfs_read_calls_total Number of read(2) system calls made to files in a filesystem.
2680# TYPE node_xfs_read_calls_total counter
2681node_xfs_read_calls_total{device="sda1"} 28
2682# HELP node_xfs_vnode_active_total Number of vnodes not on free lists for a filesystem.
2683# TYPE node_xfs_vnode_active_total counter
2684node_xfs_vnode_active_total{device="sda1"} 4
2685# HELP node_xfs_vnode_allocate_total Number of times vn_alloc called for a filesystem.
2686# TYPE node_xfs_vnode_allocate_total counter
2687node_xfs_vnode_allocate_total{device="sda1"} 0
2688# HELP node_xfs_vnode_get_total Number of times vn_get called for a filesystem.
2689# TYPE node_xfs_vnode_get_total counter
2690node_xfs_vnode_get_total{device="sda1"} 0
2691# HELP node_xfs_vnode_hold_total Number of times vn_hold called for a filesystem.
2692# TYPE node_xfs_vnode_hold_total counter
2693node_xfs_vnode_hold_total{device="sda1"} 0
2694# HELP node_xfs_vnode_reclaim_total Number of times vn_reclaim called for a filesystem.
2695# TYPE node_xfs_vnode_reclaim_total counter
2696node_xfs_vnode_reclaim_total{device="sda1"} 1
2697# HELP node_xfs_vnode_release_total Number of times vn_rele called for a filesystem.
2698# TYPE node_xfs_vnode_release_total counter
2699node_xfs_vnode_release_total{device="sda1"} 1
2700# HELP node_xfs_vnode_remove_total Number of times vn_remove called for a filesystem.
2701# TYPE node_xfs_vnode_remove_total counter
2702node_xfs_vnode_remove_total{device="sda1"} 1
2703# HELP node_xfs_write_calls_total Number of write(2) system calls made to files in a filesystem.
2704# TYPE node_xfs_write_calls_total counter
2705node_xfs_write_calls_total{device="sda1"} 0
2667# HELP node_zfs_abd_linear_cnt kstat.zfs.misc.abdstats.linear_cnt 2706# HELP node_zfs_abd_linear_cnt kstat.zfs.misc.abdstats.linear_cnt
2668# TYPE node_zfs_abd_linear_cnt untyped 2707# TYPE node_zfs_abd_linear_cnt untyped
2669node_zfs_abd_linear_cnt 62 2708node_zfs_abd_linear_cnt 62
diff --git a/collector/xfs_linux.go b/collector/xfs_linux.go
index 34228b3..9a7ad98 100644
--- a/collector/xfs_linux.go
+++ b/collector/xfs_linux.go
@@ -174,6 +174,71 @@ func (c *xfsCollector) updateXFSStats(ch chan<- prometheus.Metric, s *xfs.Stats)
174 desc: "Number of block map B-tree records deleted for a filesystem.", 174 desc: "Number of block map B-tree records deleted for a filesystem.",
175 value: float64(s.BlockMapBTree.RecordsDeleted), 175 value: float64(s.BlockMapBTree.RecordsDeleted),
176 }, 176 },
177 {
178 name: "directory_operation_lookup_total",
179 desc: "Number of file name directory lookups which miss the operating systems directory name lookup cache.",
180 value: float64(s.DirectoryOperation.Lookups),
181 },
182 {
183 name: "directory_operation_create_total",
184 desc: "Number of times a new directory entry was created for a filesystem.",
185 value: float64(s.DirectoryOperation.Creates),
186 },
187 {
188 name: "directory_operation_remove_total",
189 desc: "Number of times an existing directory entry was created for a filesystem.",
190 value: float64(s.DirectoryOperation.Removes),
191 },
192 {
193 name: "directory_operation_getdents_total",
194 desc: "Number of times the directory getdents operation was performed for a filesystem.",
195 value: float64(s.DirectoryOperation.Getdents),
196 },
197 {
198 name: "read_calls_total",
199 desc: "Number of read(2) system calls made to files in a filesystem.",
200 value: float64(s.ReadWrite.Read),
201 },
202 {
203 name: "write_calls_total",
204 desc: "Number of write(2) system calls made to files in a filesystem.",
205 value: float64(s.ReadWrite.Write),
206 },
207 {
208 name: "vnode_active_total",
209 desc: "Number of vnodes not on free lists for a filesystem.",
210 value: float64(s.Vnode.Active),
211 },
212 {
213 name: "vnode_allocate_total",
214 desc: "Number of times vn_alloc called for a filesystem.",
215 value: float64(s.Vnode.Allocate),
216 },
217 {
218 name: "vnode_get_total",
219 desc: "Number of times vn_get called for a filesystem.",
220 value: float64(s.Vnode.Get),
221 },
222 {
223 name: "vnode_hold_total",
224 desc: "Number of times vn_hold called for a filesystem.",
225 value: float64(s.Vnode.Hold),
226 },
227 {
228 name: "vnode_release_total",
229 desc: "Number of times vn_rele called for a filesystem.",
230 value: float64(s.Vnode.Release),
231 },
232 {
233 name: "vnode_reclaim_total",
234 desc: "Number of times vn_reclaim called for a filesystem.",
235 value: float64(s.Vnode.Reclaim),
236 },
237 {
238 name: "vnode_remove_total",
239 desc: "Number of times vn_remove called for a filesystem.",
240 value: float64(s.Vnode.Remove),
241 },
177 } 242 }
178 243
179 for _, m := range metrics { 244 for _, m := range metrics {